Since Phatboy won't critically examine the answers he quotes I'm going to do some chewing on one of them myself. This one:
So, how does Joseph 'step into' Mary's lineage? How does he 'pick up' her legal heritage?
Probably through the law of levirate marriage.
From the listed verses these represent laws on levirate marriage
Deuteronomy 25:5-6
5 When brothers live together and one of them dies and has no son, the wife of the deceased shall not be married outside the family to a strange man. Her husband's brother shall go in to her and take her to himself as wife and perform the duty of a husband's brother to her.
6 "It shall be that the firstborn whom she bears shall assume the name of his dead brother, so that his name will not be blotted out from Israel.
(NASB)
So the offspring of a levirate marriage could be seen as having two fathers (his legal father and his biological father). But he wouldn't take his wife's lineage. The dead husband's lineage wouldn't change - the whole point of the marriage is to continue it, not replace it. The brother's lineage wouldn't change either - the only way it is relevant is that he must be brother of the deceased (and therefore has the same ancestry).
So Jewish a levirate marriage doesn't involve anyone adopting the lineage of their wife. It isn't a "probably" the case - it isn't even POSSIBLY the case.