The last Mishna in Horiyos lists the order in which people should be saved in a life-or-death crisis (e.g. who gets in the lifeboat first): kohen, levi, yisrael, mamzer, nasin, ger, freed slave. However, concludes the Mishna, this rule is true only where comparing people of equal scholarship - even a mamzer who is a talmid chacham takes precedence over a kohen gadol who is an am ha’aretz.
My son was medayek: if the Mishna wanted to contrast the extreme cases of a talmid chacham with tainted lineage vs. the kohen hagol am ha’aretz, why choose the case of a talmid chacham mamzer? The Mishna should have illustrated the point with the most extreme case of bad lineage, the case of a freed eved!
The Tiferes Yisrael makes the same observation and concludes that a talmid chacham who is a nasin, ger, or freed eved would not in fact take precedence over a kohen gadol. The status of talmid chacham only tips the scales in favor of someone who is a yisrael, levi, or mamzer.
On that note, my son gets a mazel tov for finishing the mishnayos in Seder Nezikin, which was certainly a productive use of his summer break, and I am happy to see he is learning to make diyukim and ask thoughtful questions.