**Bug description**

Select from table with Engine=Set does not work with 2 joins.

**Affected version**

Reproduces on 21.3.15.4

**How to reproduce**

Creating base table and set table:

```sql
CREATE TABLE users (
  userid UInt64
)
ENGINE = MergeTree() ORDER BY (userid);
INSERT INTO users VALUES (1),(2),(3);

CREATE TABLE users_set (
  userid UInt64
)
ENGINE = Set;
INSERT INTO users_set VALUES (1),(2);

-- works
select * from users where userid in users_set;
```

Adding one more table and one more join:

```sql
CREATE TABLE user_names(
    userid UInt64,
    name String
) ENGINE = MergeTree() ORDER BY (userid);

INSERT INTO user_names VALUES (1, 'Batman'), (2, 'Joker'), (3, 'Superman');

-- still works
select userid, name 
from users any left join user_names on (users.userid = user_names.userid) 
where userid in users_set;
```

And one more table plus 2nd join breaks it:

```sql
CREATE TABLE user_real_names(
    uid UInt64,
    real_name String
) ENGINE = MergeTree() ORDER BY (uid);

INSERT INTO user_real_names VALUES (1, 'Bruce Wayne'), (2, 'Unknown'), (3, 'Clark Kent');

--DOES NOT WORK
select 
    users.userid,
    name,
    real_name
from users 
    any left join user_names on (users.userid = user_names.userid) 
    any left join user_real_names on (users.userid = user_real_names.uid)
where users.userid in users_set;
```

**Expected behavior**

Working query, just like with one or no joins. Expected output: 

```
1	Batman	Bruce Wayne
2	Joker	Unknown
```

**Error message and/or stacktrace**

```Unknown column name 'users_set': While processing SELECT```

CollectColumnIdentifiersVisitor(data_using_identifiers).visit(join.using_expression_list);
            }
        }
    }
    
    for (auto & expr : on_aliases)
    {
        CheckAliasDependencyVisitor::Data check{data.aliases};
        CheckAliasDependencyVisitor(check).visit(expr.second);
        if (check.dependency)
            throw Exception("Cannot rewrite JOINs. Alias '" + expr.first +
                            "' used in ON section depends on another alias '" + check.dependency->name() + "'",
                            ErrorCodes::NOT_IMPLEMENTED);
    }
    
    for (auto * ident : using_identifiers)
        if (on_aliases.count(ident->name()))
            throw Exception("Cannot rewrite JOINs. Alias '" + ident->name() + "' appears both in ON and USING", ErrorCodes::NOT_IMPLEMENTED);
    using_identifiers.clear();
    
    RewriteWithAliasVisitor(on_aliases).visit(ast);
    on_aliases.clear();
    
    std::unordered_set<ASTIdentifier *> public_identifiers;
    for (auto & top_level_child : select.select()->children)
        if (auto * ident = top_level_child->as<ASTIdentifier>())
            public_identifiers.insert(ident);
    UniqueShortNames unique_names;
    std::vector<TableNeededColumns> needed_columns =
        normalizeColumnNamesExtractNeeded(data.tables, data.aliases, identifiers, public_identifiers, unique_names);