**Describe the bug**
columns('regexp') didn't return all columns by regexp where 3+ joins in query 

**Does it reproduce on recent release?**
version 21.3.4 revision 54447

**How to reproduce**

in query we have 3 columns 'test' but returned only one:

```
select columns('test') from                                                                                                                                                               
(select 1 as id, 'a' as test) a                                                                                                                                                                    
left join (select 1 as id, 'b' as test) b on b.id = a.id                                                                                                                                               
left join (select 1 as id, 'c' as test) c on c.id = a.id;                                                                                                                                               
                                                                                                                               
Query id: 2fc3ebdf-8ec9-4684-af02-3b87bfe18705
                                                   
┌─test─┐                                           
│ c    │                                           
└──────┘                                           
                                                   
1 rows in set. Elapsed: 0.007 sec.
```

but if we change query:

```
select  columns('test'), a.test as t1, b.test as t2, c.test as t3 from 
(select 1 as id, 'a' as test) a 
left join (select 1 as id, 'b' as test) b on b.id = a.id 
left join (select 1 as id, 'c' as test) c on c.id = a.id

Query id: 5bf07e05-ec0e-4017-853d-b7b23b8a6b16

┌─--a.test─┬─--b.test─┬─test─┬─t1─┬─t2─┬─t3─┐
│ a        │ b        │ c    │ a  │ b  │ c  │
└──────────┴──────────┴──────┴────┴────┴────┘

1 rows in set. Elapsed: 0.006 sec.
```
ASTPtr left_table = src_tables[0];
    static ASTPtr subquery_template = makeSubqueryTemplate();
    for (size_t i = 1; i < src_tables.size() - 1; ++i)
    {
        auto expression_list = subqueryExpressionList(i, needed_columns, alias_pushdown);
        ASTPtr subquery = subquery_template->clone();
        SubqueryExpressionsRewriteVisitor::Data expr_rewrite_data{std::move(expression_list)};
        SubqueryExpressionsRewriteVisitor(expr_rewrite_data).visit(subquery);
        left_table = replaceJoin(left_table, src_tables[i], subquery);
    }
    RewriteVisitor::Data visitor_data{left_table, src_tables.back()};
    RewriteVisitor(visitor_data).visit(select.refTables());
    data.done = true;
}
ASTPtr JoinToSubqueryTransformMatcher::replaceJoin(ASTPtr ast_left, ASTPtr ast_right, ASTPtr subquery_template)
{
    const auto * left = ast_left->as<ASTTablesInSelectQueryElement>();
    const auto * right = ast_right->as<ASTTablesInSelectQueryElement>();
    if (!left || !right)
        throw Exception("Two TablesInSelectQueryElements expected", ErrorCodes::LOGICAL_ERROR);
    if (!right->table_join)
        throw Exception("Table join expected", ErrorCodes::LOGICAL_ERROR);
    
    RewriteVisitor::Data visitor_data{ast_left, ast_right};
    RewriteVisitor(visitor_data).visit(subquery_template);
    return subquery_template;
}
}