In compiler tests, remove the ResolveEventHandlers after test exit