[BUGFIX beta] indexOf eventlistener performance

Fixes #3917