Fixed a bug related to printing counterexamples.

A flag that was set by the previous query was being used to check
whether a counterexample for the current query should be printed.
So if the last query was unsatisfiable then no counterexample
would be printed even if the current query is satisfiable.