Interesting.
So the client sometimes tells us there are 0 coins in the inventory, I am unsure why at this point. So you are avoiding this by adding an extra check:
Coins under 1000 Coins greater than 1
Because this solution works, that does possibly hint towards something in the client. I would dismiss this as scripter error, but, it happens with me too