Zig Zagged: It looks like Alice is going to be crowned King, but it turns out that she is not a member of the royal family after all. The rightful heir is also a woman, but they crown her Queen. Why they almost crowned Alice "King" is a mystery. (Triple Subverted)
Anyone who became the ruler is simply crowned by a gender-neutral term, "Ruler".
"We want to include a case of Loophole Abuse somewhere on our show." "Let's have Alice become 'King' rather than 'Queen' when her father dies."
It was originally a non-English work, and a gender-neutral royal title is translated into English as "King". The translators didn't know that the "King" of Tropeland (whose only child is Alice) would die in the fourth book.
Lampshaded: "Alice can't be the king of Tropeland! She's a lady!" "Actually, she can't rule as Queen, but there's no rule requiring the 'King' to be a man."
Conversed: "They crowned her King and not Queen? Exactly how does their system work?"
Deconstructed: Alice being crowned "King" will likely lead to a change in the law in the future, allowing Alice's daughter, Claire, to reign as "Queen".
Reconstructed: The country's sytem is that "King" is specifically defined as the ruler of Tropeland, while "Queen" is the term referring to the spouse of the "King", not necessary wife. Alice's daughter, Claire, reigned as "King", with her loyal and devoted husband, Daniel, as "Queen".
Played For Laughs: Alice is openly a woman, but reigns under the legal fiction that she is a man.
Untwisted: The constitution is amended to allow a woman to reign as "Queen". However, it will not come into effect until "King" Alice dies.