Debugging duplicate event handler registration