Let Rhino make a new Brep instead of changing the surface in the existing one (the previous approach seemed to create valid Breps, too, but still there could be problems further processing the results)
Properly tracking the Flip state, so that really only the specified direction is reversed (this is the same behaviour as in the RhinoScript method)