I think this needs to be in an else block from the previous test, else we write to `delta` after freeing it.