Weird and interesting bug.
1) Have a full inventory.
2) Have an object / item you can gather from (forageable, tar kiln, etc).
3) Right click forageable and select pick.
4) While walking to the first forageable, right click second object, and keep the list of options open.
5) Give cape to OP.
6) Watch in amazement as the forageable vanishes from existence before your eyes.
Done in vanilla and custom clients. Can happen to people that are trying to get things done quick (right clicking things ahead of time), and can be even more annoying with custom clients.
EDIT: Can actually be done on anything, Forageables not required, just something that you can gather from (branches from a tree, coal from a tar kiln, etc).