Fix failing delete test. Fixes #10823