**Describe what's wrong**

Query with rollup using same selected field name as the name of underlying column reports structure mismatch

**Does it reproduce on recent release?**

yes

**How to reproduce**

`21.9.2.17`

```sql
CREATE TABLE test
(
    `d` DateTime,
    `a` LowCardinality(String),
    `b` UInt64
)
ENGINE = MergeTree
PARTITION BY toDate(d)
ORDER BY d;

SELECT *
FROM (
    SELECT
        a,
        max((d, b)).2 AS value
    FROM test
    GROUP BY rollup(a)
)
WHERE a <> '';
```

**Expected behavior**

This used to return an ok result on v21.8

**Error message and/or stacktrace**

> Code: 352. DB::Exception: Block structure mismatch in (columns with identical name must have identical structure) stream: different columns:
> notEquals(a, '') LowCardinality(UInt8) ColumnLowCardinality(size = 0, UInt8(size = 0), ColumnUnique(size = 1, UInt8(size = 1)))
> notEquals(a, '') LowCardinality(UInt8) Const(size = 0, ColumnLowCardinality(size = 1, UInt8(size = 1), ColumnUnique(size = 2, UInt8(size = 2)))). (AMBIGUOUS_COLUMN_NAME) (version 21.9.2.17 (official build))



* - in the addExternalStorage function, the JOIN (SELECT ...) subquery is replaced with JOIN _data1,
        *   in the subquery_for_set object this subquery is exposed as source and the temporary table _data1 as the `table`.
        * - this function shows the expression JOIN _data1.
        */
    auto interpreter = interpretSubquery(
        join_element.table_expression, context, original_right_columns, query_options.copy().setWithAllColumns());
    auto joined_plan = std::make_unique<QueryPlan>();
    interpreter->buildQueryPlan(*joined_plan);
    {
        auto sample_block = interpreter->getSampleBlock();
        auto rename_dag = std::make_unique<ActionsDAG>(sample_block.getColumnsWithTypeAndName());
        for (const auto & name_with_alias : required_columns_with_aliases)
        {
            if (sample_block.has(name_with_alias.first))
            {
                auto pos = sample_block.getPositionByName(name_with_alias.first);
                const auto & alias = rename_dag->addAlias(*rename_dag->getInputs()[pos], name_with_alias.second);
                rename_dag->getIndex()[pos] = &alias;
            }
        }
        auto rename_step = std::make_unique<ExpressionStep>(joined_plan->getCurrentDataStream(), std::move(rename_dag));
        rename_step->setStepDescription("Rename joined columns");
        joined_plan->addStep(std::move(rename_step));
    }
    auto joined_actions_step = std::make_unique<ExpressionStep>(joined_plan->getCurrentDataStream(), std::move(joined_block_actions));
    joined_actions_step->setStepDescription("Joined actions");
    joined_plan->addStep(std::move(joined_actions_step));
    return joined_plan;
}
JoinPtr SelectQueryExpressionAnalyzer::makeTableJoin(