After Queen Sophie of the Netherlands failed to get her son engaged to either Alexandra of Denmark or her sisters-in-law Alice and Helena there were those at the Dutch court who wanted the prince of Orange (Wiwill oldest son of Willem III and Sophie) to marry his father's first cousin princess Marie of the Netherlands. Marie was considered intelligent and rich but ugly. Queen Sophie did not want to hear of it. Had Wiwill and Marie married their sons would have pushed back his younger brother Alexander, his uncle and her first cousin Hendrik as well as her father prince Frederik back in the line of succession. In the end Wiwill and Alexander both died bachelors before their father and the throne almost went to Marie's father who died a year after the birth of princess Wilhelmina who would end up being her father's heiress.
It has been said that King Otto of Bavaria, as a boy, formed an attraction to his first cousin Theresa -- the princess who was the only daughter of his uncle Luitpold, who eventually served as prince regent of the kingdom on behalf of his nephews (Otto, and before him his older brother, the famous "Mad" Ludwig II). She returned his affections, and might have married him -- but for his own mental incapacity, thanks to various factors (bad genes, premature birth, syphilis, PTSD; of course, confinement in a mental institution could not have helped matters, either).
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.