proper detection of subclasses in mtlInherit and mtlBase