Fixed a bug where an event listener removed from the event dispatcher while it is still in the _toAddedListeners vector would never have _isRegistered set to false on removal. This causes it to fail an assert if it is attempted to be added to the event dispatcher again later.
Merge pull request #6157 from dbaack/remove_event_listener_fix

closed #4700: Removing and re-adding an event listener will trigger an assert.