Fix hopping into inventories with multiple slots

There was a bug that prevented inserting stacks into inventories.
Take a look at the referenced issue for details.

Fixes #25