### 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/main/java/org/elasticsearch/xpack/esql/analysis/Analyzer.java
attributes.addAll(plan.metadataFields());
            return new EsRelation(plan.source(), esIndex, attributes);
        }
    }
    /**
     * Specific flattening method, different from the default EsRelation that:
     * 1. takes care of data type widening (for certain types)
     * 2. drops the object and keyword hierarchy
     */
    private static List<Attribute> mappingAsAttributes(Source source, Map<String, EsField> mapping) {
        var list = new ArrayList<Attribute>();
        mappingAsAttributes(list, source, null, mapping);
        list.sort(Comparator.comparing(Attribute::qualifiedName));
        return list;
    }
    private static void mappingAsAttributes(List<Attribute> list, Source source, String parentName, Map<String, EsField> mapping) {
        for (Map.Entry<String, EsField> entry : mapping.entrySet()) {
            String name = entry.getKey();
            EsField t = entry.getValue();
            if (t != null) {
                name = parentName == null ? name : parentName + "." + name;
                var fieldProperties = t.getProperties();
                
                var type = EsqlDataTypes.widenSmallNumericTypes(t.getDataType());
                
                
                if (type != t.getDataType()) {
                    t = new EsField(t.getName(), type, t.getProperties(), t.isAggregatable(), t.isAlias());
                }