Add "if (clauses == null) return env;" in SATSolver