fix Issue 9952 - Attribute inference for virtual functions breaks subclasses