(Genesis 49:3:) "Reuben, you are my firstborn." One said [that it was spoken] to his disgrace, and one said [that it was spoken] to his praise. To his disgrace: He said to him, "Reuben, you are my firstborn" — you are a firstborn and I am a firstborn. Rabbi Yehudah ha-Levi son of Rabbi Shalom said: For eighty-four years Jacob never saw a [nocturnal] emission. I am a firstborn and you are a firstborn.
Why Jacob Calls Reuben Firstborn to His Disgrace
Midrash Tanchuma Buber, Vayechi 11:3
ראובן בכורי אתה (בראשית מט ג). חד אמר לפגם וחד אמר לשבח, לפגם, אמר לו ראובן בכורי אתה, אתה בכור ואני בכור, אמר ר' יהודה הלוי ב"ר שלום שמונים וארבע שנה לא ראה יעקב קרי, אני בכור ואתה בכור.