fix for weakRefs to TypeDef objects