Refactors listener notification to use a safe copy of the listeners.