Fix removeEventListener patch

Fix a case where the event handler is not removed when the event handler
function is used to handle multiple events on the same element.