A cap would be really useful for understanding your problem
I'm not sure .. but it seems like it may be caused when values are going above 360 or below 0
I'd recommend adding some sort of debug text object in the layout, and get that to display all the values that are involved.
if any are above 360, then include a '%360' to the value.. this will cause it to loop back around to 0 if it's above 360. eg: 370%360 would equal 10
If it's below 0, then add 360 to it.
However I did this before they added the "is between angles" and "is within angle" conditions, and also the "anglediff", "anglelerp" expressions.. I have a feeling these would have solved my problems easier.
But yeah, post a cap. :p