ואחרי כן יצא אחיו וגו’ צֵא וּלְמַד מִשְּׁפוֹפֶרֶת שְׁפִּיהָ קְצָרָה, תֶּן לָהּ שְׁתֵּי אֲבָנִים זוֹ אַחַר זוֹ, – הַנִּכְנֶסֶת רִאשׁוֹנָה תֵּצֵא אַחֲרוֹנָה וְהַנִּכְנֶסֶת אַחֲרוֹנָה תֵּצֵא רִאשׁוֹנָה; נִמְצָא עֵשָׂו הַנּוֹצָר בָּאַחֲרוֹנָה יָצָא רִאשׁוֹן וְיַעֲקֹב שֶׁנוֹצַר רִאשׁוֹנָה יָצָא אַחֲרוֹן, וְיַעֲקֹב בָּא לְעַכְּבוֹ, שֶׁיְּהֵא רִאשׁוֹן לְלֵידָה כְּרִאשׁוֹן לִיצִירָה, וְיִפְטוֹר אֶת רַחֲמָהּ וְיִטּוֹל אֶת הַבְּכוֹרָה מִן הַדִּין
After that his brother came out, etc. Go and learn this from a narrow tube, insert two stones, one behind the other. The one inserted first will come out last and the one inserted last will come out first. Consequently, Eisov, who was conceived last came out first and Yaakov, who was conceived first came out last. Yaakov, thus, attempted to hold him back so that he [Yaakov] would be born first as he was the first conceived and be the first out of the womb so that he would rightfully gain his birthright.
Rashi (stating that he's quoting a Medrash to explain the pshat) seems to be implying that when twins are born, the "bechor" is really the second one to emerge. But (as far as I know) we don't consider that to be true according to Halachah. How does this jive with his explanation that Yaakov is "really" the bechor?