Fixes a bug where the thread local variable "current_lua_script" is not set when calling script_tick.