Fix exception when adding an element twice.

This PR fixes an exception when a event handler is removed from an event backed by the WeakEventManager.