TRUNK-3960 - Fix for the order of registering the listeners.