This happened in a pokemon movie for magearna and volcanion, this was 1 of the reasons why I asked this aswell. (while it was a forced mega evolution for them tho)
I also noticed that you can do multiple megas for a npc 1 time before they reset and I would like it to be a feature.
If so a option to activate it would probably be usefull, so you won't get a random npc that is in the wild has this.