Simplify or-expressions with repeating arguments