The problem is that you have an object with the alias "water waterskin" and the algorithm, when you empty the container, will try to remove the "water" alias from the list.
So it removes "water", and checks the resulting list of names ("waterskin") again. And it finds the word "water" inthere.
In an older version of the codebase there is a bug here, that results in not checking the length of the words to remove. So, if the word contains "water", all of it is removed.
Now, if you do the same with a cup, which has the alias list "cup water", once it has removed the "water" keyword, you still have "cup".
Once you fill it again, it will get the fluid name appended to the alias list again. So if you have a cup of water ("cup water") and empty it ("cup") and then fill it with firebreather, you'll get a "cup firebreather".
This is why it works with cups, but not your waterskin.
The bug is fixed in the current version, as far as I know.