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



const TableJoin & analyzedJoin() const { return *syntax->analyzed_join; }
    const NamesAndTypesList & sourceColumns() const { return syntax->required_source_columns; }
    const std::vector<const ASTFunction *> & aggregates() const { return syntax->aggregates; }
    
    void initGlobalSubqueriesAndExternalTables(bool do_global);
    ArrayJoinActionPtr addMultipleArrayJoinAction(ActionsDAGPtr & actions, bool is_left) const;
    void getRootActions(const ASTPtr & ast, bool no_subqueries, ActionsDAGPtr & actions, bool only_consts = false);
    /** Similar to getRootActions but do not make sets when analyzing IN functions. It's used in
      * analyzeAggregation which happens earlier than analyzing PREWHERE and WHERE. If we did, the
      * prepared sets would not be applicable for MergeTree index optimization.
      */
    void getRootActionsNoMakeSet(const ASTPtr & ast, bool no_subqueries, ActionsDAGPtr & actions, bool only_consts = false);
    void getRootActionsForHaving(const ASTPtr & ast, bool no_subqueries, ActionsDAGPtr & actions, bool only_consts = false);
    /** Add aggregation keys to aggregation_keys, aggregate functions to aggregate_descriptions,
      * Create a set of columns aggregated_columns resulting after the aggregation, if any,
      *  or after all the actions that are normally performed before aggregation.
      * Set has_aggregation = true if there is GROUP BY or at least one aggregate function.
      */
    void analyzeAggregation(ActionsDAGPtr & temp_actions);
    void makeAggregateDescriptions(ActionsDAGPtr & actions, AggregateDescriptions & descriptions);
    const ASTSelectQuery * getSelectQuery() const;
    bool isRemoteStorage() const { return syntax->is_remote_storage; }
    NamesAndTypesList getColumnsAfterArrayJoin(ActionsDAGPtr & actions, const NamesAndTypesList & src_columns);
    NamesAndTypesList analyzeJoin(ActionsDAGPtr & actions, const NamesAndTypesList & src_columns);
};
class SelectQueryExpressionAnalyzer;