## 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
PRAGMA cache_spill = TRUE;
PRAGMA vdbe_addoptrace = TRUE;
PRAGMA stats;
.timer on
CREATE TABLE t3(x,y);
INSERT INTO t3 VALUES(1,NULL);
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',1.0), ('a','c',-1.0), ('b','d',0.0);
SELECT
COALESCE(a,'e') AS d,
COALESCE(b,'f') AS e,
SUM(c) AS f
FROM T
GROUP BY a,b;
INSERT INTO t3 VALUES(2,NULL);
INSERT INTO t3 VALUES(3,4);
SELECT count(x), y FROM t3 GROUP BY y ORDER BY 1;

SELECT * FROM t3 AS a JOIN t3 AS b ON a.rowid = b.rowid;
```

## Actual output

```sql
Run Time: real 0.000 user 0.000000 sys 0.000239
Run Time: real 0.000 user 0.000000 sys 0.000015
Run Time: real 0.000 user 0.000000 sys 0.000053
Run Time: real 0.000 user 0.000000 sys 0.000020
a|b|1.0
a|c|-1.0
b|d|0.0
Run Time: real 0.000 user 0.000000 sys 0.000061
Run Time: real 0.000 user 0.000000 sys 0.000007
Run Time: real 0.000 user 0.000000 sys 0.000007
1|4
2|
Run Time: real 0.000 user 0.000000 sys 0.000093
1||1|
2||2|
3|4|3|4
Run Time: real 0.000 user 0.000000 sys 0.000028
```

## Expectation

```sql
Run Time: real 0.000135 user 0.000146 sys 0.000000
Run Time: real 0.000009 user 0.000008 sys 0.000000
Run Time: real 0.000022 user 0.000023 sys 0.000000
Run Time: real 0.000010 user 0.000011 sys 0.000000
a|b|1.0
a|c|-1.0
b|d|0.0
Run Time: real 0.000031 user 0.000030 sys 0.000000
Run Time: real 0.000003 user 0.000003 sys 0.000000
Run Time: real 0.000002 user 0.000002 sys 0.000000
1|4
2|
Run Time: real 0.000015 user 0.000016 sys 0.000000
1||1|
2||2|
3|4|3|4
Run Time: real 0.000024 user 0.000025 sys 0.000000
```

## Flag

```

```

