### Description

`FROM test | eval x1 = pow(emp_no, 1), x2 = pow(x1, 1), x3 = pow(x2, 2)`

or

`FROM test | eval x1 = substring(ip1, 3), x2 = substring(x1, 2), x3 = substring(x2, 2)`

or

`FROM test | eval x1 = concat(ip1, ip2), x2 = concat(x1, "--"), x3 = concat(x2, "**")`

will fail with 

```
                "type": "verification_exception",
                "reason": "Found 1 problem\nline 1:65: Unknown column [x2], did you mean [x1]?"
```

Spawned from https://github.com/elastic/elasticsearch/issues/99472
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerTests.java
}
    public void testFailOnUnresolvedIndex() {
        Analyzer analyzer = analyzer(IndexResolution.invalid("Unknown index [idx]"));
        VerificationException e = expectThrows(VerificationException.class, () -> analyzer.analyze(UNRESOLVED_RELATION));
        assertThat(e.getMessage(), containsString("Unknown index [idx]"));
    }
    public void testIndexWithClusterResolution() {
        EsIndex idx = new EsIndex("cluster:idx", Map.of());
        Analyzer analyzer = analyzer(IndexResolution.valid(idx));
        var plan = analyzer.analyze(UNRESOLVED_RELATION);
        var limit = as(plan, Limit.class);
        assertEquals(new EsRelation(EMPTY, idx, false), limit.child());
    }
    public void testAttributeResolution() {
        EsIndex idx = new EsIndex("idx", TypesTests.loadMapping("mapping-one-field.json"));
        Analyzer analyzer = analyzer(IndexResolution.valid(idx));
        var plan = analyzer.analyze(
            new Eval(EMPTY, UNRESOLVED_RELATION, List.of(new Alias(EMPTY, "e", new UnresolvedAttribute(EMPTY, "emp_no"))))
        );
        var limit = as(plan, Limit.class);
        var eval = as(limit.child(), Eval.class);
        assertEquals(1, eval.fields().size());
        assertEquals(new Alias(EMPTY, "e", new FieldAttribute(EMPTY, "emp_no", idx.mapping().get("emp_no"))), eval.fields().get(0));
        assertEquals(2, eval.output().size());
        Attribute empNo = eval.output().get(0);
        assertEquals("emp_no", empNo.name());
        assertThat(empNo, instanceOf(FieldAttribute.class));
        Attribute e = eval.output().get(1);
        assertEquals("e", e.name());
        assertThat(e, instanceOf(ReferenceAttribute.class));