Fix delete SEGV

.. autodelete doesn't like detached items.