[FOLD] Fix unit test crash with dtor