Fix script errors not being reported

Script.update event needs to be emitted after reporting any script errors.

Script errors in event functions were not being reported if a Script.update event function was also being used.