Add fix for removing listener during emit

This fixes an issue that occurred when an event had multiple listeners
attached and one listener was removed while emiting. This caused an
issue for `once` which only allowed one listener to be active at the
time.