Fix getmetatable/setmetatable to obey __metatable