shell: don't delete an object to create it again immediately later