fix bug in inventory_ui: dropping stacks & volume calculation

Fixes #7627