I think the test for virtual class has the wrong constant name: 
if ((inh->Property() & kIsVirtual) != 0) should instead be: if ((inh->Property() & kIsVirtualBase) != 0)
This is why the function never returned -2.
And I think I should first use this function because this goes through the inheritance hierarchy, whereas the test in TClingBaseClassInfo::Offset: if (!(Property() & kIsVirtualBase)) is looking only at the current class and not teh inheritance tree.
Am I correct?