Fix #315: Respect -infer with -check command