FS-6220 fix sql quoting of queries from mod_skinny