27 See too by this how it may happen, that one man may have not two sons only, but two fathers also. For by the mention of adoption, it may occur to your thoughts that so it may be. For it is said; A man can have two sons, but two fathers he cannot have. But the truth is, it is found that he can have two fathers also, if one have begotten him of his body, and another adopted him in love. If one man then can have two fathers, Joseph could have two fathers also; might be begotten by one, and adopted by another.
And if this be so, what do their cavillings mean, who insist that Matthew has followed one set of generations, and Luke another? And in fact we find that so it is, for Matthew has given Jacob as the father of Joseph, and Luke Heli. Now it is true it might seem, as if one and the same man, whose son Joseph was, had two names. But inasmuch as the grandfathers, and all the other progenitors which they enumerate, are different, and in the very number of the generations, the one has more, and the other fewer, Joseph is plainly shown hereby to have had two fathers.
Now having disposed of the cavil of this question, forasmuch as clear reason has shown that it may happen that he who has begotten a child may be one father, and he who has adopted him another: supposing two fathers, it is nothing strange if the grandfathers and the great grandfathers, and the rest in the line upwards which are enumerated, should be different as coming from different fathers.
Source: Sermons on Selected Lessons of the New Testament (New Advent)