Fixes #4681 Move the Event to the factory so it is executed right before creating the object itself.
Hopefully this works, if not please comment. thanks for report!