Merge branch 'hotfix/badstatus296'
* Fix #332: "ValueError: invalid operation on closed shelf". Not really sure when this can happen, but if I got a bug report it means that it does happen and I need to fix it. This is mostly a workaround... since it's not something important actually.
Merge branch 'hotfix/shelve332' into develop