Fixes #5577, Dionaea crashing on death. Fixes #5838, tomes not being able to be stored on bookshelves."

To be honest, I'm not actually sure why this fixes it. At first I thought it had to be S.key = H.key, but removing the line did the trick. Does the mind.transfer_to already handle setting the keys?

Fixes #5577 
Fixes #5838