Simplification rule for nested AND and OR tokens.