Had circumstances been different, however, those two might have married and produced heirs to the throne. Of course, they would have had to have sons, since the Bavarian succession is in the male line only. If that had happened, then the said hypothetical children would have genealogically preceded her father and brothers in the line to the throne, in the order of primogeniture. After all, Theresa's father was the third son of King Ludwig I, while Otto's father was the first son (that was why he succeeded, as King Maximilian II).
What this means, then, is that Prince Luitpold would have been displaced in the succession by his own grandsons. Of course, this didn't happen; but still, it could have.
So my question is: HAVE there, in fact, been cases in European royal history where a dynast got displaced in the line to the throne by a grandchild, regardless of the particular succession law?
It's a well-known fact that the woman we know in history as Queen Marie of Romania was romantically linked, early in her life, with a first cousin who eventually succeeded to the British throne as King George V. As it was, she passed up a chance to become his queen by turning down his proposal (thanks to the influence of her mother, the formidable Duchess of Edinburgh); she ended up queen of Romania instead, as the consort of King Ferdinand.
But in an alternative scenario, the children of the Prince of Wales and Duke of Edinburgh might have married and had children. In that case, the latter would have been displaced in the succession by his own grandchildren, both male and female.
Of course, this didn't happen, either -- but it could have. So I was wondering about real cases of princes preceded in royal successions by their grandsons, if not grandchildren in general. This is theoretically possible in any dynasty, since cousin marriages are possible -- and in fact, before World War I, were common occurrences.