Fixed item-destroying bug

Putting an item into a bookshelf other than a written book would cause
it to be destroyed. Now, they are thrown out when you close the
inventory.