<verbatim>
CREATE TABLE t1(x);
INSERT INTO t1 VALUES('ALFKI');
INSERT INTO t1 VALUES('ANATR');

CREATE TABLE t2(y, z);
CREATE INDEX t2y ON t2 (y);
INSERT INTO t2 VALUES('ANATR', '1997-08-08 00:00:00');
INSERT INTO t2 VALUES('ALFKI', '1997-08-25 00:00:00');

SELECT (
  SELECT y FROM t2 WHERE x = y ORDER BY y, z
)
FROM t1;
</verbatim>

The script above should return two rows - one with 'ANATR' and a second with 'ALFKI'. Instead it returns 'ANATR' and then NULL.

Problem introduced by commit [4678cb1044f0b].