As another example, in 977 King Lothair of France's wife Queen Emma was accused of adultery with Bishop Adelberen of Laon by Lothair's brother Charles. Nobody knows if the charges were true. Emma and Adelberen were not convicted and Charles was exiled from France. If the charges were false Lothair and Emma's son Louis was the rightful heir to the throne, if the charges were correct Charles would be the rightful heir to the throne.
In 978 Lothair invaded the Holy Roman Empire and Emperor Otto II retaliated by invading France and proclaiming Charles the new king. And no matter who was the rightful king or heir of France before, the instant that the emperor decreed that Charles was the king of France, all right to the throne was snatched away from Lothair and his descendants and/or successors - such as the Capetians and Bourbons - and granted to Charles and his heirs forever, or until such time as some future emperor should decree otherwise.
So it doesn't matter if Emmas's son, the future Louis V, was really Lothair's legitimate son or the bastard son of Bishop Adelberen of Laon. When the emperor decreed that Charles was the king of France, Louis and all his successors lost all right to become king.
Centuries later four future successors of Lothair and Louis married two sets of sisters, two daughters of the Count of Burgundy and two daughters of the Duke of Burgundy, just to confuse everyone.
The future Louis X, Philip V, and Charles IV, sons of Philip IV the (un) Fair, and their first cousin the future Philip VI, were married to those four young women when three of the wives were accused of adultery in the Tour de Nesle affair in 1314.
Posts # 1, 14, here: http://historum.com/medieval-byzantine-history/121828-navarre-succession-crises-1316-1322-1328-a-2.html
discuss the possible lines of succession to the potential heirs.
And none of these possible cases of royal illegitimacy matter to the present day presidents of France whose right depends only on being elected according to the terms of the constitution of the Fifth Republic of France established in 1958.
And for much the same reasons the claim of Elizabeth II to be the rightful monarch of the United Kingdom does not depend on whether any medieval monarchs of England or Scotland were of legitimate birth. Her claim of right to be queen goes back only as far as the invasion and revolution in 1688. She claims to be the rightful heir according to the rules and laws of succession established by the invaders and revolutionaries of 1688, no more, no less.
If someone accepts that the "Glorious Revolution" of 1688 was totally right, then Elizabeth II is the 100 percent legal and rightful sovereign of the United Kingdom. If someone does not accept the "Glorious Revolution" of 1688 as totally right, then there are numerous other persons with claims to be the rightful monarchs, and the question of which medieval English and Scottish royalty was of legitimate birth is then important to selecting the true rightful heir.