Make sure that elements that have been removed also have their special events cleaned up. Fixes #6084.
Attach a file by drag & drop or click to upload