### 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
private static Function<Page, Page> alignPageToAttributes(List<Attribute> attrs, Layout layout) {
        
        
        
        final int[] mappedPosition = new int[attrs.size()];
        int index = -1;
        boolean transformRequired = false;
        for (var attribute : attrs) {
            mappedPosition[++index] = layout.get(attribute.id()).channel();
            transformRequired |= mappedPosition[index] != index;
        }
        Function<Page, Page> transformer = transformRequired ? p -> {
            var blocks = new Block[mappedPosition.length];
            for (int i = 0; i < blocks.length; i++) {
                blocks[i] = p.getBlock(mappedPosition[i]);
            }
            ProjectOperator.closeUnused(p, blocks);
            return new Page(blocks);
        } : Function.identity();
        return transformer;
    }
    private PhysicalOperation planExchange(ExchangeExec exchangeExec, LocalExecutionPlannerContext context) {
        throw new UnsupportedOperationException("Exchange needs to be replaced with a sink/source");
    }
    private PhysicalOperation planExchangeSink(ExchangeSinkExec exchangeSink, LocalExecutionPlannerContext context) {
        Objects.requireNonNull(exchangeSinkHandler, "ExchangeSinkHandler wasn't provided");
        var child = exchangeSink.child();
        PhysicalOperation source = plan(child, context);
        boolean isAgg = child instanceof AggregateExec || child instanceof EsStatsQueryExec;
        Function<Page, Page> transformer = isAgg ? Function.identity() : alignPageToAttributes(exchangeSink.output(), source.layout);