Fix ROOT-6943: no errors whith virtual inheritance from TObject