## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.stats vmstep
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES (1,'a',1.25), (2,'b',-3.5), (3,'c',9e999);
WITH d AS (SELECT * FROM T) SELECT * FROM d WHERE c > 0;
WITH cte AS (SELECT * FROM T) SELECT * FROM cte c1 JOIN cte c2 ON c1.c = c2.c;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_386 AS SELECT b FROM T;
VACUUM main;
REINDEX T;
```

## Actual output

```sql
VM-steps: 30
VM-steps: 35
1|a|1.25
3|c|Inf
VM-steps: 29
1|a|1.25|1|a|1.25
2|b|-3.5|2|b|-3.5
3|c|Inf|3|c|Inf
VM-steps: 128
VM-steps: 30
VM-steps: 3
VM-steps: 2
```

## Expectation

```sql
VM-steps: 30
VM-steps: 35
1|a|1.25
3|c|Inf
VM-steps: 29
1|a|1.25|1|a|1.25
2|b|-3.5|2|b|-3.5
3|c|Inf|3|c|Inf
VM-steps: 97
VM-steps: 30
VM-steps: 4
VM-steps: 3
```

## Flag

```

```

