fix bug of missing applySubstInfer after unify in several places