We've had some custom code register shutdown methods for reindexing.
This code is triggered on delete() amongst other actions.
It's conditional on SapphireTest::is_running_tests() which is
unset in SapphireTest->tearDown(), so we have to place any
delete operations before that.