Fix some left-over event code when using --ignore-events

The last commit that introduced --ignore-events missed a few spots where
event related code was generated even when that option was given.