Is that a legal question? I don't know what legal significance the birth of Jesus had as the firstborn to the marriage but not to the adoptive or apparent father, but I know that firstborn is by the mother, as is Jewishness in general (*). In truth though, Jesus is the firstborn of God, as you and I know, and that has mystical rather than legal significance. Matthew was writing his gospel primarily to the Jews and it was natural for him to underscore the point, and, of course, in his narrative, as it correctly tells us Who the real Father is, the adoptive paternity of St. Joseph played no role.
There is a good chance though -- although we don't know for sure, there is no single tradition on that, -- that the firstborn son of Joseph was none other but St. James the Just, brother of the Lord, a Holy Apostle and the First Bishop of Jerusalem. So yes, the dedication probably worked fine.
Reading ahead, I see Belteshazzar quoting aptly Ex 13:2, thank you. That is what I tried to remember.
By your own admission there is no historical proof, no Scriptural evidence, no writings from the early church fathers, no nothing to support the contention that Joseph was previously married and had children from that marriage, and yet here we see Catholics arguing for something that has no basis in a DESPERATE bid to somehow explain away the clear reading of Scripture that Jesus had siblings and still maintain the perpetual virginity of Mary.
All this demonstrates is that Catholics want to believe this to be true so badly that they will stoop to any kind of rationale and convoluted reasoning to bolster this unsupportable doctrine, even to the point of making things up.
Why do Catholics want the perpetual virginity to be true so bad? How does it diminish either Christ and His work on the earth, or Mary in the role she played in fulfilling prophecy that after His birth she honorably fulfilled her role as wife to Joseph? Why is Mary diminished in character by having had sex with Joseph and, in obedience to God's command to be fruitful and multiply, bearing him children of their own?