Another SQL single-quote escaping bugfix.