Ensure that Component load event has component property. Fixes #119

Adds test to expose the bug and reorders exising code to fix it.