## 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
.timer on
PRAGMA defer_foreign_keys = FALSE;
BEGIN DEFERRED TRANSACTION;
-- glob('[!0-9]', 'a')

ATTACH DATABASE (':memory:' || '') AS aux25;
-- sqlite_compileoption_used({v})

-- NOCASE

CREATE VIRTUAL TABLE t0 USING /**/ fts4("x", "y", "z");
DROP TABLE t0;
DETACH DATABASE aux25;
END TRANSACTION;
PRAGMA defer_foreign_keys = FALSE;
BEGIN DEFERRED TRANSACTION;
-- glob('[!0-9]', 'a')

ATTACH DATABASE (':memory:' || '') AS aux25;
-- sqlite_compileoption_used({v})

-- NOCASE

CREATE VIRTUAL TABLE t0 USING /**/ fts4("x", "y", "z");
DROP TABLE t0;
DETACH DATABASE aux25;
END TRANSACTION;
PRAGMA defer_foreign_keys = FALSE;
BEGIN DEFERRED TRANSACTION;
-- glob('[!0-9]', 'a')

ATTACH DATABASE (':memory:' || '') AS aux25;
-- sqlite_compileoption_used({v})

-- NOCASE

CREATE VIRTUAL TABLE t0 USING /**/ fts4("x", "y", "z");
DROP TABLE t0;
DETACH DATABASE aux25;
END TRANSACTION;

CREATE TABLE T1 (
  a INTEGER,
  b TEXT
);
CREATE TABLE T2 (
  a INTEGER,
  b TEXT
);
INSERT INTO T1 VALUES (1,'a'),(2,'b');
INSERT INTO T2 VALUES (1,'c'),(1,'d');
SELECT T1.b,
(
  SELECT GROUP_CONCAT(b,',')
  FROM T2
  WHERE T2.a=T1.a
) AS c
FROM T1;
```

## Actual output

```sql
Run Time: real 0.000 user 0.000066 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.000 user 0.000147 sys 0.000000
Run Time: real 0.000 user 0.000508 sys 0.000000
Run Time: real 0.001 user 0.000302 sys 0.000000
Run Time: real 0.000 user 0.000008 sys 0.000000
Run Time: real 0.000 user 0.000011 sys 0.000000
Run Time: real 0.000 user 0.000005 sys 0.000000
Run Time: real 0.000 user 0.000003 sys 0.000000
Run Time: real 0.000 user 0.000040 sys 0.000000
Run Time: real 0.000 user 0.000381 sys 0.000000
Run Time: real 0.000 user 0.000242 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.000 user 0.000005 sys 0.000000
Run Time: real 0.000 user 0.000004 sys 0.000000
Run Time: real 0.000 user 0.000002 sys 0.000000
Run Time: real 0.001 user 0.000031 sys 0.000000
Run Time: real 0.000 user 0.000353 sys 0.000000
Run Time: real 0.000 user 0.000210 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.000 user 0.000004 sys 0.000000
Run Time: real 0.000 user 0.000051 sys 0.000000
Run Time: real 0.000 user 0.000043 sys 0.000000
Run Time: real 0.000 user 0.000017 sys 0.000000
Run Time: real 0.000 user 0.000011 sys 0.000000
a|c,d
b|
Run Time: real 0.000 user 0.000050 sys 0.000000
```

## Expectation

```sql
Run Time: real 0.000017 user 0.000030 sys 0.000000
Run Time: real 0.000002 user 0.000001 sys 0.000000
Run Time: real 0.000052 user 0.000052 sys 0.000000
Run Time: real 0.000212 user 0.000212 sys 0.000000
Run Time: real 0.000159 user 0.000160 sys 0.000000
Run Time: real 0.000005 user 0.000005 sys 0.000000
Run Time: real 0.000002 user 0.000003 sys 0.000000
Run Time: real 0.000002 user 0.000002 sys 0.000000
Run Time: real 0.000001 user 0.000001 sys 0.000000
Run Time: real 0.000015 user 0.000015 sys 0.000000
Run Time: real 0.000135 user 0.000135 sys 0.000000
Run Time: real 0.000108 user 0.000109 sys 0.000000
Run Time: real 0.000002 user 0.000002 sys 0.000000
Run Time: real 0.000001 user 0.000002 sys 0.000000
Run Time: real 0.000001 user 0.000001 sys 0.000000
Run Time: real 0.000000 user 0.000001 sys 0.000000
Run Time: real 0.000011 user 0.000011 sys 0.000000
Run Time: real 0.000117 user 0.000118 sys 0.000000
Run Time: real 0.000077 user 0.000076 sys 0.000000
Run Time: real 0.000001 user 0.000002 sys 0.000000
Run Time: real 0.000001 user 0.000002 sys 0.000000
Run Time: real 0.000018 user 0.000018 sys 0.000000
Run Time: real 0.000015 user 0.000015 sys 0.000000
Run Time: real 0.000009 user 0.000009 sys 0.000000
Run Time: real 0.000003 user 0.000004 sys 0.000000
a|c,d
b|
Run Time: real 0.000026 user 0.000026 sys 0.000000
```

## Flag

```

```

