You do need a separate object, or the objects are the same....
I doubt you want rawequal(object.foo1, object.foo2) == true, or
rawequal(object, object.foo1) == true.
object.foo1 is not equal to object.foo2, because the slice of values are different. Comparing two values with type LUA_TUSERDATA need not change: just compare two tuples (A tuple is combine with two 32bit integers)