Possible Glitch?

So, I was about to catch a Zygarde in the game, when we’re supposed to be able to, but for some reason when the battle entered Cresselia ended up spawning in it’s place. It was originally Diana’s of course because she released her pokemon after the darkrai event that we could do. So, just wondering, how the heck did this happen because now I can no longer fully complete the game, which I really wanted to do.

It replaces random encounters, including static encounters. Save before you fight legendaries.

Ahhh, now that makes sense. Luckily I saved before the Taen battle, so I’ll just reset the game and re-fight Taen to get Zygarde.