First reported on the forum here.
The problem is that in RInterface::DefineImpl we take the output of TypeID2TypeName as an indicator of whether a given type is known to the interpreter or not. In some cases, e.g. vector<UnknownType>, TClass::GetClass and therefore TypeID2TypeName return the name of the type even if it's not instantiatable by the interpreter.
DefineImpl should further check the type_info. Philippe suggests the following logic: