It appears to be by design. When you save your character file, it checks if you have more than $maxItem of any one item when it builds the list of your stuff. If so, it drops you down to $maxItem. It's a global variable in globals.cs and defaults to 500.
So, it will save a max of $maxItem (default 500) of any particular thing but will let higher quantities float in memory until you log on again. At that point, it uses the capped item count that it saved.