Treatment of surface intersections for gradient-based aerodynamic shape optimization