Fixes a crash in JavaScriptDebugServer::returnEvent when debugging