Fix errors and empty result sets when the facets contain quotes