**Describe the bug**

"Not found column ... in block" error, when join on alias column.

**How to reproduce**

```sql
CREATE TABLE a (
    id UInt32,
    value UInt32,
    id_alias UInt32 ALIAS id    
) ENGINE = MergeTree() ORDER BY id;

CREATE TABLE b (
    id UInt32,
    value UInt32
) ENGINE = MergeTree() ORDER BY id;

INSERT INTO a VALUES (1, 1), (2, 2), (3, 3);
INSERT INTO b VALUES (1, 4), (2, 5), (3, 6);

SELECT * FROM a JOIN b ON a.id_alias = b.id;
```

**Expected behavior**

In version 21.5.9.4 result is:

id | value | b.id | b.value
-- | -------- | ----- | ----------
1 |  1 | 1 | 4 
2 | 2 | 2 | 5 
3 | 3 | 3 | 6 

**Error message and/or stacktrace**

In version 21.7.5.29 result is:
```
SQL Error [10]: ClickHouse exception, code: 10, host: 127.0.0.1, port: 14343; Code: 10, e.displayText() = DB::Exception: Not found column id_alias in block. There are only columns: id, value (version 21.7.5.29 (official build))
```
for (auto & source_column : source_columns)
            {
                auto c = column_sizes.find(source_column.name);
                if (c == column_sizes.end())
                    continue;
                size_t type_size = source_column.type->haveMaximumSizeOfValue() ? source_column.type->getMaximumSizeOfValueInMemory() : 100;
                columns.emplace_back(ColumnSizeTuple{c->second.data_compressed, type_size, c->second.data_uncompressed, source_column.name});
            }
        }
        if (!columns.empty())
            required.insert(std::min_element(columns.begin(), columns.end())->name);
        else if (!source_columns.empty())
            
            required.insert(ExpressionActions::getSmallestColumn(source_columns));
    }
    else if (is_select && metadata_snapshot && !columns_context.has_array_join)
    {
        const auto & partition_desc = metadata_snapshot->getPartitionKey();
        if (partition_desc.expression)
        {
            auto partition_source_columns = partition_desc.expression->getRequiredColumns();
            partition_source_columns.push_back("_part");
            partition_source_columns.push_back("_partition_id");
            partition_source_columns.push_back("_part_uuid");
            partition_source_columns.push_back("_partition_value");
            optimize_trivial_count = true;
            for (const auto & required_column : required)
            {
                if (std::find(partition_source_columns.begin(), partition_source_columns.end(), required_column)
                    == partition_source_columns.end())