Yes, you are right about the cause.
Your case seems to be causing a similar effect of a server crash, when it gets terminated in an abnormal situation.
I am not sure if there is really something that can be done in this case... while you could create a script command to force saving the character data for this case, you would still have it open for others.
I think the best option would be to:
1. When doing a production server normal shutdown, always do it properly. Kick all players (even better: do something to prevent them from logging back in) and wait some time (I think ~5 minutes would be more than enough).
I think if map server is shut down separately first, it will send all data to char, but this is something that would need to be done manually
2. If there was a server crash, which could cause those dupes, you probably need to either review your logs of the last few minutes and check if actions are needed, or rollback to a recent backup if you think it would be safer