Issue #2425759 by andypost, jhodgdon: SearchQuery lacks preExecute(), making countQuery() run even when there are problems in prepare step