Fixed duplication when dragging media into the backpack

Transfer of #157.
Fixes #100.