Tests: Fix Reference::destroy after deprecation