Offset caching in range_search_2d.