I can't really look at the .cap right now, so I'll just do some guesswork.
I am assuming the Xcomp and cos(Vector) get into negative values when facing left, right? In that case, you have the following case:
clamp(Xcomp,200,-200). This is erroneous, try making sure the min and max values are correctly set.
I'd suggest something like this:
cosV = cos(Vector)
minSpeed = min(cosV*-200, cosV*200)
maxSpeed = max(cosV*-200, cosV*200)
clamp(value, minSpeed, maxSpeed)
That way, the minimum and maximum values will be correctly ordered. Let me know how it goes.