Fixes bug with bubbling delegated events, introduced in the previous commit.