Refactor check-model handling in SmtEngine (#3723)