Restrict the formulas that are passed to the solver in order to avoid generating invalid counter examples. Previously the incorrectly set up formula resulted in invalid counter examples that were then removed in the following filtering step. That led to the weird situation where the fixed DPLL algorithm returned less counter examples than the buggy version.
Cleanup `LinkedHashSet` fixes and replace them with `Set`.