I was in the Nether with my friend, when I tried to take a screenshot and my client crashed due to lack of RAM, but I was still in the server. A pigman killed me and my stuff dropped, but then I logged on and had all my things. The items from my player when I crashed were still on the ground, hence they duplicated. So I guess the actual bug is when you crash due to RAM sometimes you don't leave the game.
Linked issues
Comments

Duplicate of (private) MC-37586