Fixes a bug in super and subclasses which cause stack overflow on circular hierarchies