Are you using a DS Linker or similar? I used to have the same problem... Your card most likely has a file called "lastsave" or something SIMILAR.
This keeps reverting your .sav file when you modify it... Just save save pokemon, then turn off and back on, and play and save a different game. Then turn off and modify pokemon. This way the last save isn't pokemon and it can't use that to revert it.