**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(SettingString, format_custom_row_before_delimiter, "", "Delimiter before field of the first column (for CustomSeparated format)", 0) \
    M(SettingString, format_custom_row_after_delimiter, "\n", "Delimiter after field of the last column (for CustomSeparated format)", 0) \
    M(SettingString, format_custom_row_between_delimiter, "", "Delimiter between rows (for CustomSeparated format)", 0) \
    M(SettingString, format_custom_result_before_delimiter, "", "Prefix before result set (for CustomSeparated format)", 0) \
    M(SettingString, format_custom_result_after_delimiter, "", "Suffix after result set (for CustomSeparated format)", 0) \
    \
    M(SettingString, format_regexp, "", "Regular expression (for Regexp format)", 0) \
    M(SettingString, format_regexp_escaping_rule, "Escaped", "Field escaping rule (for Regexp format)", 0) \
    M(SettingBool, format_regexp_skip_unmatched, false, "Skip lines unmatched by regular expression (for Regexp format", 0) \
    \
    M(SettingBool, output_format_enable_streaming, false, "Enable streaming in output formats that support it.", 0) \
    M(SettingBool, output_format_write_statistics, true, "Write statistics about read rows, bytes, time elapsed in suitable output formats.", 0)
    #define LIST_OF_SETTINGS(M)    \
        COMMON_SETTINGS(M)         \
        FORMAT_FACTORY_SETTINGS(M)
    DECLARE_SETTINGS_COLLECTION(LIST_OF_SETTINGS)
    /** Set multiple settings from "profile" (in server configuration file (users.xml), profiles contain groups of multiple settings).
     * The profile can also be set using the `set` functions, like the profile setting.
     */
    void setProfile(const String & profile_name, const Poco::Util::AbstractConfiguration & config);
    /// 
    void loadSettingsFromConfig(const String & path, const Poco::Util::AbstractConfiguration & config);
    /// 
    void dumpToArrayColumns(IColumn * column_names, IColumn * column_values, bool changed_only = true);
    /// 
    /// 
    void addProgramOptions(boost::program_options::options_description & options);
};
}