**Describe the unexpected behaviour**

The column resolution seems to resolve an alias to the wrong column when there is a left join in the query.

**How to reproduce**
* Which ClickHouse server version to use: `20.3.12.112`
* Which interface to use, if matters: HTTP Interface (but should not matter)

Please run the following queries:
```sql
-- Tables
CREATE TABLE default.tableConversion (
	conversionId String,
	value Nullable(Double)
) ENGINE = Log();

CREATE TABLE default.tableClick (
	clickId String,
	conversionId String,
	value Nullable(Double)
) ENGINE = Log();

CREATE TABLE default.leftjoin (
	id String
) ENGINE = Log();

-- Values
INSERT INTO default.tableConversion(conversionId, value) VALUES ('Conversion 1', 1);
INSERT INTO default.tableClick(clickId, conversionId, value) VALUES ('Click 1', 'Conversion 1', 14);
INSERT INTO default.tableClick(clickId, conversionId, value) VALUES ('Click 2', 'Conversion 1', 15);
INSERT INTO default.tableClick(clickId, conversionId, value) VALUES ('Click 3', 'Conversion 1', 16);

-- Query
SELECT
	conversion.conversionId as myConversionId,
	click.clickId as myClickId,
	click.myValue as myValue
FROM (
	SELECT conversionId, value as myValue
	FROM default.tableConversion
) as conversion
INNER JOIN (
	SELECT clickId, conversionId, value as myValue
	FROM default.tableClick
) as click ON click.conversionId = conversion.conversionId
LEFT JOIN (
	SELECT * FROM default.leftjoin
) as dummy on (dummy.id = conversion.conversionId)
```

**Expected behavior**
The values in the `myValue` column should be 14, 15 and 16.

**Actual behaviour**
The values in the `myValue` column is 1.

This means, that the colum `click.myValue as myValue` gets resolved as `conversion.myValue`. Please notice that the source table has been changed!

**Additional context**

The behaviour is only visible when there is a `LEFT JOIN` in the Query. Referencing the `leftjoin` table in the `SELECT` statement does not change the result. **Leaving the `LEFT JOIN` out of the query makes it return the correct results.**

\
    M(SettingUInt64, max_rows_to_group_by, 0, "", 0) \
    M(SettingOverflowModeGroupBy, group_by_overflow_mode, OverflowMode::THROW, "What to do when the limit is exceeded.", 0) \
    M(SettingUInt64, max_bytes_before_external_group_by, 0, "", 0) \
    \
    M(SettingUInt64, max_rows_to_sort, 0, "", 0) \
    M(SettingUInt64, max_bytes_to_sort, 0, "", 0) \
    M(SettingOverflowMode, sort_overflow_mode, OverflowMode::THROW, "What to do when the limit is exceeded.", 0) \
    M(SettingUInt64, max_bytes_before_external_sort, 0, "", 0) \
    M(SettingUInt64, max_bytes_before_remerge_sort, 1000000000, "In case of ORDER BY with LIMIT, when memory usage is higher than specified threshold, perform additional steps of merging blocks before final merge to keep just top LIMIT rows.", 0) \
    \
    M(SettingUInt64, max_result_rows, 0, "Limit on result size in rows. Also checked for intermediate data sent from remote servers.", 0) \
    M(SettingUInt64, max_result_bytes, 0, "Limit on result size in bytes (uncompressed). Also checked for intermediate data sent from remote servers.", 0) \
    M(SettingOverflowMode, result_overflow_mode, OverflowMode::THROW, "What to do when the limit is exceeded.", 0) \
    \
    /* TODO: Check also when merging and finalizing aggregate functions. */ \
    M(SettingSeconds, max_execution_time, 0, "", 0) \
    M(SettingOverflowMode, timeout_overflow_mode, OverflowMode::THROW, "What to do when the limit is exceeded.", 0) \
    \
    M(SettingUInt64, min_execution_speed, 0, "Minimum number of execution rows per second.", 0) \
    M(SettingUInt64, max_execution_speed, 0, "Maximum number of execution rows per second.", 0) \
    M(SettingUInt64, min_execution_speed_bytes, 0, "Minimum number of execution bytes per second.", 0) \
    M(SettingUInt64, max_execution_speed_bytes, 0, "Maximum number of execution bytes per second.", 0) \
    M(SettingSeconds, timeout_before_checking_execution_speed, 10, "Check that the speed is not too low after the specified time has elapsed.", 0) \
    \
    M(SettingUInt64, max_columns_to_read, 0, "", 0) \
    M(SettingUInt64, max_temporary_columns, 0, "", 0) \
    M(SettingUInt64, max_temporary_non_const_columns, 0, "", 0) \
    \
    M(SettingUInt64, max_subquery_depth, 100, "", 0) \