Fix bug where we didn't correctly record CPU time spent in 'on_new_event' block.