**Describe the bug**
```
milovidov-desktop :) SET allow_experimental_analyzer = 1

SET allow_experimental_analyzer = 1

Query id: b4494b8c-9f14-4d46-8db9-2cb992dcfcb6

Ok.

0 rows in set. Elapsed: 0.001 sec. 

milovidov-desktop :) SELECT arrayFilter(x -> notEmpty(concat(x)), [NULL, NULL]) FROM system.one ARRAY JOIN [1048577] AS elem, arrayMap(x -> concat(x, elem, ''), ['']) AS unused

SELECT arrayFilter(x -> notEmpty(concat(x)), [NULL, NULL])
FROM system.one
ARRAY JOIN
    [1048577] AS elem,
    arrayMap(x -> concat(x, elem, ''), ['']) AS unused

Query id: ca118c75-812b-4c83-bd30-1af64ed38635


0 rows in set. Elapsed: 0.003 sec. 

Received exception from server (version 22.13.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Cannot capture column 3 because it has incompatible type: got Array(UInt32), but UInt32 is expected.. (LOGICAL_ERROR)
```
* In first join expression ON t1.id = t2.id t1.id is resolved into test_table.id column.
      * In second join expression ON t1.id = t3.id t1.id must be resolved into test_table.id column after first JOIN.
      */
    scope.use_identifier_lookup_to_result_cache = false;
    if (query_node_typed.getJoinTree())
    {
        TableExpressionsAliasVisitor table_expressions_visitor(scope);
        table_expressions_visitor.visit(query_node_typed.getJoinTree());
        initializeQueryJoinTreeNode(query_node_typed.getJoinTree(), scope);
        scope.alias_name_to_table_expression_node.clear();
        resolveQueryJoinTreeNode(query_node_typed.getJoinTree(), scope, visitor);
    }
    scope.use_identifier_lookup_to_result_cache = true;
    
    auto projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope);
    if (query_node_typed.getProjection().getNodes().empty())
        throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED,
            "Empty list of columns in projection. In scope {}",
            scope.scope_node->formatASTForErrorMessage());
    if (query_node_typed.hasWith())
        resolveExpressionNodeList(query_node_typed.getWithNode(), scope, true , false );
    if (query_node_typed.getPrewhere())
        resolveExpressionNode(query_node_typed.getPrewhere(), scope, false , false );
    if (query_node_typed.getWhere())
        resolveExpressionNode(query_node_typed.getWhere(), scope, false , false );
    if (query_node_typed.hasGroupBy())
    {
        if (query_node_typed.isGroupByWithGroupingSets())
        {
            for (auto & grouping_sets_keys_list_node : query_node_typed.getGroupBy().getNodes())