I had an Iron-Pickaxe (efficiency 5, unbreaking 3) and mined with it until it was broken. So I put my Diamond-Pickaxe (same enchantments) In the same slot (slot.hotbar.0) where the Iron-Pickaxe was before. In the moment I left-clicked on the slot with the diaaxe the diaaxe was placed in the slot but I got the Iron-Pickaxe back on the cursor...
Not duplication, just a visual glitch. Dupe of MC-1040