The leak problem of span_to_snippet is fixed by #6853, but it's not a fix for the fundamental issue.
The previous code, like the new code introduced in #6853, should deallocate memory, but it didn't.
So I think there's a fundamental problem in __lookup_byte_offset_proxy.