The following query

```
row  a = \"a\", b = 1 | stats  e = min(b) by a | dissect a \"%{e}\" | mv_expand e
```


throws an IndexOutOfBoundsException when building the layout for MV_EXPAND.


x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java
private static final Logger logger = LogManager.getLogger(LocalExecutionPlanner.class);
    private final String sessionId;
    private final CancellableTask parentTask;
    private final BigArrays bigArrays;
    private final BlockFactory blockFactory;
    private final EsqlConfiguration configuration;
    private final ExchangeSourceHandler exchangeSourceHandler;
    private final ExchangeSinkHandler exchangeSinkHandler;
    private final EnrichLookupService enrichLookupService;
    private final PhysicalOperationProviders physicalOperationProviders;
    public LocalExecutionPlanner(
        String sessionId,
        CancellableTask parentTask,
        BigArrays bigArrays,
        BlockFactory blockFactory,
        EsqlConfiguration configuration,
        ExchangeSourceHandler exchangeSourceHandler,