Not to worry: that is only a valid basis for annulment if the pope did not grant a dispensation, who is as God, and thus since Mary had God's sanction then it was as good as the pope's. But David and Abishag the Shunammite is another case, married or not.
When I get to be old...