Fix the bug induced by a object removing itself from the array of listeners.

https://montage.atlassian.net/browse/MON-467