Genesis 38, God's Grace

Question: I have heard it said that the line of the Jesus comes through Judah rather than Reuben, Simeon and Levi because these older brothers disqualified themselves.  Reuben slept with his father's concubine and Simeon and Levi led the charge to kill the people that violated their sister.  As we read chapter 38 doesn't Judah disqualify himself as he does not keep his promise to Tamar and then sleeps with her thinking she was a prostitute and then wants to kill her for this act until he realizes that he is the man that she slept with?  Does the line of the Messiah have more to do with God's grace than man earning this privilege? Answer: That is a great point. And we will see God's grace many more times as we follow the line of Jesus. -PJ