Therefore all these things have been described for Christ’s sake, in order that it might be certain that He really had to be born from sinful flesh, but without sin. Accordingly, David says this of himself in Ps. 51:5: “Behold, I was brought forth in iniquity.” This is said correctly also of the flesh of Christ as it was in the womb of Tamar, before it was assumed and purged. But this flesh He assumed later, after it had been purged, in order that He might be able to bear the punishment for sin in His own body.
Luther’s works, vol. 7: Lectures on Genesis: Chapters 38-44 p 31