Optimization: Remove useless calls to union()