Fixed a bug where listeners were notified listeners->size() times due to
a bad earlier refactoring.