The following query answers 'wrong' even though the correct answer is 'right':

<blockquote><verbatim>
CREATE TABLE t1(x);
INSERT INTO t1 VALUES('right'),('wrong');
SELECT DISTINCT x
 FROM (SELECT x FROM t1 GROUP BY x)
 WHERE x='right'
 ORDER BY x;


Bisecting shows that this problem was introduced by check-in
[1e64dd782a126f48d78c4] on 2014-02-08 and first appeared in
SQLite version 3.8.4.