**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.
```
for (const auto & table : tables)
        needed_columns.push_back(TableNeededColumns{table.table});
    for (ASTIdentifier * ident : identifiers)
    {
        bool got_alias = aliases.count(ident->name());
        bool allow_ambiguous = got_alias; 
        if (auto table_pos = IdentifierSemantic::chooseTableColumnMatch(*ident, tables, allow_ambiguous))
        {
            if (!ident->isShort())
            {
                if (got_alias)
                {
                    auto alias = aliases.find(ident->name())->second;
                    auto alias_table = IdentifierSemantic::getTableName(alias->ptr());
                    bool alias_equals_column_name = false;
                    if ((!ident->isShort() && alias->ptr()->getColumnNameWithoutAlias() == ident->getColumnNameWithoutAlias())
                        || (alias_table == IdentifierSemantic::getTableName(ident->ptr())
                            && ident->shortName() == alias->as<ASTIdentifier>()->shortName()))
                    {
                        alias_equals_column_name = true;
                    }
                    if (!alias_equals_column_name)
                        throw Exception("Alias clashes with qualified column '" + ident->name() + "'", ErrorCodes::AMBIGUOUS_COLUMN_NAME);
                }
                String short_name = ident->shortName();
                String original_long_name;
                if (public_identifiers.count(ident))
                    original_long_name = ident->name();
                size_t count = countTablesWithColumn(tables, short_name);
                if (count > 1 || aliases.count(short_name))