### CI Link

https://gradle-enterprise.elastic.co/s/xws6gmgwdwnmm/tests/overview?outcome=failed

### Repro line

./gradlew ':x-pack:plugin:esql:test' --tests "org.elasticsearch.xpack.esql.CsvTests" -Dtests.method="test {rename.RenameProjectEval}" -Dtests.seed=F32BCA1B870438F -Dtests.locale=ar-LY -Dtests.timezone=UTC -Druntime.java=21	

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

```
java.lang.AssertionError: java.lang.IllegalStateException: can't release already released block [IntVectorBlock[vector=IntArrayVector[positions=3, values=[2, 5, 4]]]]
```
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java
return planEnrich(enrich, context);
        }
        
        else if (node instanceof OutputExec outputExec) {
            return planOutput(outputExec, context);
        } else if (node instanceof ExchangeSinkExec exchangeSink) {
            return planExchangeSink(exchangeSink, context);
        }
        throw new EsqlIllegalArgumentException("unknown physical plan node [" + node.nodeName() + "]");
    }
    private PhysicalOperation planAggregation(AggregateExec aggregate, LocalExecutionPlannerContext context) {
        var source = plan(aggregate.child(), context);
        return physicalOperationProviders.groupingPhysicalOperation(aggregate, source, context);
    }
    private PhysicalOperation planEsQueryNode(EsQueryExec esQueryExec, LocalExecutionPlannerContext context) {
        return physicalOperationProviders.sourcePhysicalOperation(esQueryExec, context);
    }
    private PhysicalOperation planEsStats(EsStatsQueryExec statsQuery, LocalExecutionPlannerContext context) {
        if (physicalOperationProviders instanceof EsPhysicalOperationProviders == false) {
            throw new EsqlIllegalArgumentException("EsStatsQuery should only occur against a Lucene backend");
        }
        if (statsQuery.stats().size() > 1) {
            throw new EsqlIllegalArgumentException("EsStatsQuery currently supports only one field statistic");
        }
        
        EsStatsQueryExec.Stat stat = statsQuery.stats().get(0);
        EsPhysicalOperationProviders esProvider = (EsPhysicalOperationProviders) physicalOperationProviders;
        Function<SearchContext, Query> querySupplier = EsPhysicalOperationProviders.querySupplier(stat.filter(statsQuery.query()));
        Expression limitExp = statsQuery.limit();
        int limit = limitExp != null ? (Integer) limitExp.fold() : NO_LIMIT;