There is a midrash that posits that Shem and Malkitzedek king of Shalem are the same person. Furthermore, that Malkitzedek (=Shem) was until that point the kohen to Hashem, but it transferred at that point to Avraham. The reason for this transfer was that in Malkitzedek's blessing of Avraham, he first blessed Avraham and only then blessed Hashem.
There are presumably various causes (and textual cues) for the conflation of these two Biblical characters, including the general midrashic closed-canon approach.
But something struck me about the midrash's focus on placing Avraham before Hashem in blessing. And that is how we can contrast Noach's blessing of Shem with Shem's (that is, Malkitzedek's) blessing of Avraham:
In parshas Noach, in Bereishis 9:
But second, notice that Shem's blessing is not actually a blessing of Shem. Noach blesses Hashem, who is the God of Shem. He also gets Canaan as a servant. In the next verse, he gets Yefet dwelling in his tents. But the primary aspect here is the blessing of God.
Thus, this stands in marked contrast to Shem's (=Malkitzedek's) blessing of Avraham, as it appears in parshas Lech Lecha. In Bereishit 14:
first there is a blessing to Avraham. Shem apparently did not learn the lesson Noach tried to convey to him in his blessing. This might well have been what Chazal saw when they spoke as this being the failing of Shem which caused the transfer of kehuna to Avraham.