Event loop order fixes

Specifically, fixes to when Loader events happen relative to frame events.