Glitch: Me First/Substitute Glitch

Hi all, glad to be a part of the community.

I’m currently facing Taen after defeating Calreath, and have encountered a rather interesting bug, not entirely sure if this one has been bought up.

Using the move Me First while the opposing Pokemon is using Substitute will cause the players Pokemon to get locked into an endless loop of using Me First, regardless of how much PP the move has. Restarting the game fixes the issue, but I thought it best to bring this to light.