Optimize inheritanceIterators