Allow dispatching the same event multiple times

Fixes #266