Avoid stack overflow when exception occurs during close.
Report 'expected event arrived too early' via script, not stack trace.