**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))



{
    auto having_step
        = std::make_unique<FilterStep>(query_plan.getCurrentDataStream(), expression, getSelectQuery().having()->getColumnName(), false);
    having_step->setStepDescription("HAVING");
    query_plan.addStep(std::move(having_step));
}
void InterpreterSelectQuery::executeTotalsAndHaving(
    QueryPlan & query_plan, bool has_having, const ActionsDAGPtr & expression, bool overflow_row, bool final)
{
    const Settings & settings = context->getSettingsRef();
    auto totals_having_step = std::make_unique<TotalsHavingStep>(
        query_plan.getCurrentDataStream(),
        overflow_row,
        expression,
        has_having ? getSelectQuery().having()->getColumnName() : "",
        settings.totals_mode,
        settings.totals_auto_threshold,
        final);
    query_plan.addStep(std::move(totals_having_step));
}
void InterpreterSelectQuery::executeRollupOrCube(QueryPlan & query_plan, Modificator modificator)
{
    const auto & header_before_transform = query_plan.getCurrentDataStream().header;
    ColumnNumbers keys;
    for (const auto & key : query_analyzer->aggregationKeys())
        keys.push_back(header_before_transform.getPositionByName(key.name));
    const Settings & settings = context->getSettingsRef();
    Aggregator::Params params(
        header_before_transform,
        keys,