Consider disposed shells as closed when closing all shells. Fixes #598