Issue #5781: Fix audio end event issue in closure compile advanced mode