I had 64 melons in my hand, my inventory was full, and there was 1 melon on the floor. When I through out a melon, it would be added to the stack on the floor visually, but I would still have 64 in my inventory. Then when I threw out the whole stack, the stack on the floor grew, but I still had 64 in my inventory. In these screenshots, there are 65 melons in total.
Duplicate of MC-120643