Let's say that Ceuta turned out to be a disaster, with John of Aviz as well as all his legitimate sons dying. Let's also say that Afonso, 1st Duke of Braganza survives.
There are now three contenders for the throne. John's eldest daughter was Infanta Isabella, who happened to be married to...