I accidentally found this glitch, that do the reverse of dup.
If you left click + right click sametime that will remove the item frame and destroy your item you just placed (you can see in my slots i'm at 12 Torchs at the start).
The 2 last time i did was to show that doesn't bug if i don't right + left click sametime.
Thanks for reporting this issue, but this is a duplicate of MC-59363.