This reverts commit 32f543760c7f44c4c7d18bc00a3a1d8860c42bff. Investigations showed that the unit test utilities were calling erase(), causing a use-after-free. Fixed by rearranging checks in the test
buffer-deallocation