underlying query is a UNION ALL and both arms of the UNION ALL are
subqueries with an ORDER BY clause. This bug was reported at
[forum:/forumpost/6b5e9188f0657616|forum post 6b5e9188f0657616]. The
problem was introduced in 2015 (SQLite version 3.9.0) by check-in
[4b631364354068af]. See also ticket [b65cb2c8d91f6685].
FossilOrigin-Name: 6c806f64bbc9e98891bad0868575ee2ec5d0951ceb0c71d3ed417b45d5f27561