Yann is right, it's by design - triggers aren't checked in the top-to-bottom running of the event sheet, they fire whenever the event happens, and most events happen before or after the event sheet runs. If you want a flag set to 1 for the one tick an event fires, make sure you clear the flag at the end of the event sheet. However I would recommend doing everything inside the trigger event if possible.
I've updated the documentation on how events work to clarify this.