Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite.