If the result is `-1`, it means that the pivot value (`refvalue`) was not found, so the `value` was not inserted, so we don't index it in this case.