Cherry-pick the HandleEvent changes from the original vtable PR

- Fix #2118
- Take over from #2293