I strongly suspect that the problem is that you have a class or structure like this:
struct Foo
{
Bar bar;
}
And you set both Foo and Bar in Lua through LuaWrapper. The important thing here is that bar- this is the first field in your structure Foo. In addition, you may have a class that inherits from some other base class, and both the derived and base classes are exposed by LuaWrapper.
LuaWrapper , , (, , Lua). . , , , Foo Bar , , , LuaWrapper .
, . , , metatable, , , , metatable .
, , . LuaWrapper , , .