refine descendant_class algorithm with a tie breaker hot spot