Solid.BySweep - Profile rotation issue

Im struggling with sweeping profile along path. My profile loses its horizontal orientation and it slightly roates at the end of sweeping path. My first though was that Curve coordinate system will be rotated as well, by that not the case. Does anyone have an idea how to fix this?

Sample.dyn (20.3 KB)

Try using a Solid.Sweep2Rails node, or the Solid.ByLoft node with the guide curves override.