Swept Cut not following path - simple question

(See attached image) I am trying to extrude a square cut along a half-cylinder, using a "Spline on Surface" as a guideline along the outside of the half-cylinder (to reduce the height of the square cut towards the end).

I feel like this should be very easy for solidworks to understand what I want to do, but as you can see from the preview image, the swept cut behaves very strangely at the end. If you were to project that same spline on a half-cylinder of smaller radius, I would want the material between those two half-cylinders removed. Help? Thanks!

SolidworksParts And Features