Better handling of implict globals in Lua code