Fixed an ordering safeguard that could still be misled by a note in the query
The safeguard ignored notes inside a database query when reading the ordering instruction, but not when locating it, so a note mentioning ordering could still mislead it. Notes are now removed once, before any part of the check runs.