DiffFactorizer: throw IllegalStateException if the op type is unexpected