Handle removing content of containers in advanced inventory

Fixes #10620 - has this ever worked?

Tested with salt in a bottle.