Fix an access to unallocated memory in LuaRef
Merge branch 'fix_luaref'