Fix TClassRef handling.