## 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
.fullschema
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',x'682f554feb092cde0c4f302c570051'), ('a','c',-(-((mod(json_extract(5.0, '$.key'), 5.0) - 0)))), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
INSERT INTO T SELECT * FROM T;
ALTER TABLE T DROP COLUMN a; /* pi() */ WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x>=83) SELECT MAX(x) FROM cnt;
WITH cte AS (SELECT * FROM T) SELECT * FROM cte;
```

## Actual output

```sql
/* No STAT tables available */
a|b|h/UOë	,ÞO0,W|1
a|c||2
b|d|-8.25|1
1
b|h/UOë	,ÞO0,W
c|
d|-8.25
b|h/UOë	,ÞO0,W
c|
d|-8.25
```

## Expectation

```sql
/* No STAT tables available */
a|b|h/UOë	,Þ^LO0,W|1
a|c||2
b|d|-8.25|1
1
b|h/UOë	,Þ^LO0,W
c|
d|-8.25
b|h/UOë	,Þ^LO0,W
c|
d|-8.25
```

## Flag

```

```

