Fix issues with unsat cores and reset-assertions (#4159)