Holy crap, what a curveball. The best plot twist in the KH series in my humble opinion.
So what I imagine happened is that the Dandelions were taking shelter inside the Book of Prophecies itself. That's how they survived the apocalypse, because the book did. After the apocalypse they all left. Skuld and Ephemera still saw that their friend was mortally wounded and couldn't be taken outside the stasis of the Book of Prophecies. They left him in there to heal, and possibly sleep in peace for eternity after all he did. (Although one or both could have very well have stayed behind to watch over him... I'm just assuming the former because he was alone aside from Chirithy when he woke up. Hopefully Skuld, simply because Ephemera is supposed to be the leader of the Dandelions, right? Hopefully he wouldn't shirk his duties.)
And there he slept... until Maleficent kicked in the door to the Book of Prophecies. The Player is now awake. He doesn't know that the most blatantly dark being he'll have ever seen face to face is in the Book with him. Doubtful he even knows he's in the book unless Chirithy tells him. And Maleficent, in turn, has no idea that a hundred million year old Keyblade Wielder is inside the book with her, and able to stop her in Sora's place since she seems so confident he can't follow her.
One thing is for sure: It's Maleficent time. She is officially Priority One and Xehanort's on the back burner. Because Xehanort needs seven of us to fight them to complete the X Blade. If we don't fight, no X Blade, at which point he has to go find the Princesses and threaten to fight them instead, which would take time. HE DOESN'T EVEN HAVE HIS THIRTEENTH SEAT FILLED.
Maleficent, on the other hand, has the Book of Prophecies. She HAS it. NOW. If she figures out how to draw power from characters in the tome like we've been doing... holy shit. Even if Xehanort gets ahold of the X Blade, if she figures out how to use the Book, SHE COULD USE IT TO USE THE POWER OF XEHANORT WITH THE X BLADE FOR HERSELF. She could actually use the book to counter an X Blade wielding Xehanort!
Again. Forget Xehanort for now. At long last, it's Maleficent time. And if the Player doesn't figure out exactly who is in there with him and stop her... I truly believe only someone with the all powerful X Blade would be able to stop her.
Holy **** Maleficent. I love you for taking the spotlight back, but calm down.