Use unchecked_partial_range(range) instead of unchecked_partial_range(iterator), since the range form can preserve the underlying index_type.