Avoid a costly loop through handlers for `undelegateEvents` and cleanup some logic