Given that vcounter is a View, the settings limit/offset dose not work as expected.

```sql
CREATE TABLE counter (id UInt64, createdAt DateTime) ENGINE = MergeTree() ORDER BY id;
INSERT INTO counter SELECT number, now() FROM numbers(500);

CREATE VIEW vcounter AS
SELECT
    intDiv(id, 10) AS tens,
    max(createdAt) AS maxid
FROM counter
GROUP BY tens;

SELECT *
FROM vcounter
ORDER BY tens ASC
LIMIT 100
SETTINGS limit = 6, offset = 5


┌─tens─┬───────────────maxid─┐
│   47 │ 2021-12-29 13:05:23 │
└──────┴─────────────────────┘

1 rows in set. Elapsed: 0.006 sec.

```

The query should return 6 rows, instead of one. 

**Does it reproduce on recent release?**

Yes, we can reproduce it on `21.10`.

**Expected behavior**

The query should return 6 rows, instead of one.

**Additional context**

Replace view with subquery works though,

```sql
SELECT *
FROM
(
    SELECT
        intDiv(id, 10) AS tens,
        max(createdAt) AS maxid
    FROM test.counter
    GROUP BY tens
)
LIMIT 100
SETTINGS limit = 6, offset = 5;

┌─tens─┬───────────────maxid─┐
│    3 │ 2021-12-29 13:05:23 │
│   31 │ 2021-12-29 13:05:23 │
│   47 │ 2021-12-29 13:05:23 │
│   40 │ 2021-12-29 13:05:23 │
│   30 │ 2021-12-29 13:05:23 │
│    2 │ 2021-12-29 13:05:23 │
└──────┴─────────────────────┘

6 rows in set. Elapsed: 0.011 sec. 
```

query_analyzer->aggregates(),
        false,
        settings.max_rows_to_group_by,
        settings.group_by_overflow_mode,
        0,
        0,
        settings.max_bytes_before_external_group_by,
        settings.empty_result_for_aggregation_by_empty_set,
        context->getTemporaryVolume(),
        settings.max_threads,
        settings.min_free_disk_space_for_temporary_data,
        settings.compile_aggregate_expressions,
        settings.min_count_to_compile_aggregate_expression);
    auto transform_params = std::make_shared<AggregatingTransformParams>(params, true);
    QueryPlanStepPtr step;
    if (modificator == Modificator::ROLLUP)
        step = std::make_unique<RollupStep>(query_plan.getCurrentDataStream(), std::move(transform_params));
    else
        step = std::make_unique<CubeStep>(query_plan.getCurrentDataStream(), std::move(transform_params));
    query_plan.addStep(std::move(step));
}
void InterpreterSelectQuery::executeExpression(QueryPlan & query_plan, const ActionsDAGPtr & expression, const std::string & description)
{
    if (!expression)
        return;
    auto expression_step = std::make_unique<ExpressionStep>(query_plan.getCurrentDataStream(), expression);
    expression_step->setStepDescription(description);
    query_plan.addStep(std::move(expression_step));
}
static bool windowDescriptionComparator(const WindowDescription * _left, const WindowDescription * _right)