Fixed issue where inheritance chain wasn't being pushed/popped properly