Here are results from your 26a file.
With Count = 100 (i. e., no changes to your code) this is the uncapped Sweep2 results:
With Count = 10, this is the uncapped geometry:
Why there is such a dramatic change of shape is puzzling indeed.
With Count = 10 this is the Capped geometry:
This is even more wrong that the uncapped version, which again suggests to me that the rail curves are being badly botched somehow.
I do understand the necessity that STL files have for closed Breps, and I take precautions to make sure that’s what I export from Rhino. But in the case of this lip geometry what I do (just to avoid extra computation time) is simply bury the uncapped lip edges slightly (0.1 mm) below the top surface to the vase geometry. So for my purposes capping is not required.
I had no such problems with Rhino5, which is where I developed the entire top lip concept. In Rhino5 my biggest problem was finding the inside and outside top edge curves. But whatever those curves turned out to be, Sweep2 always produced a nice top edge surface, assuming of course I had a reasonably shaped arc curve. I’d bet money on the fact that something in Rhino6 got FUBARed (Fouled Up Beyond All Recognition), but I guess we’ll just have to wait and see.