Simplify assertions and remove redundant ones.