Suppose a prince marries a princess from a neighboring country, with the approval of both the king and of his parliament. And they have a son, whose birth is registered in the book of dynasts, and in due course this son -- who also married a princess with the approval -- is the heir to the throne, and the parliament says so and has officials take him outside to the crowd who hail him as king. . . .
You know, all of these things have been required in one country or another at some time, though not all at once.
Which would really put a spanner in any number of long-lost heir plots. Finagling matches with isogamy -- marrying someone also from a sovereign house -- is not easy when you are a hunted fugitive. Getting approved by parliament is silly. Registering the birth is impossible. . . .
In real life, Russia didn't absolutely prohibit the succession of a female. The requirement was, however, that a woman could succeed only the absolute extinction of all male dynasts. Yet there are those that argue, because of isogamy requirement in Russian law, that the rightful heir to the Russian throne is a woman.