Not queries were incorrectly parsed to include an additional quotation mark, fixes #1899