Hey,
Not so much an error, but Pokémon continue to gain EVs with(im assuming) the ev overflow even if they were six IV and maxed out evs. here's an example: I defeated a meowth at max ev/iv and it took a spdef stat away to add a speed stat.
For what its worth, removing the EV overflow from the files fixes this. I think its really dope that while training, it can save you friendship berries by taking from lower stats, but after maxing it becomes a minor inconvenience.
Woah those came out bigger than expected. sorry about that. I saw above that the change was intended, which again, I think its cool what you did, but I imagine you intended on having it stop changing once fully maxed.