QUOTE
I was working on a project using curves and a toon shader a few months back where the texture on the curve would unexpectedly flip.
I think this is likely a different issue than the twist on a curve. The toon line creation for profile lines can suddenly split and change topology during an animation. This makes coherence of texturing along the line difficult. The toon node has code to try and keep the same start points of lines relative to the last frame, however sometimes the line direction can reverse, which it is not correcting for currently. The lines can also split as the surface moves, which is an even harder case to deal with. In general it is best to texture line properties as much as possible with things like surface based color maps and line modifier nodes, because these have better temporal coherence.
With paint effects there are a few ways one can determine the normal(or twist) of a curve. If it is a curve on surface then it is easy... we simply use the surface normal. When painting on the ground plane we automatically turn on "Use Normal" on the stroke and set it to the y up vector. For attach brush to curves it uses the local axis of curvature, which can suddenly reverse and is not defined where the curve is totally straight.
For maya hair we needed to handle twist well, due to the clumping model used, so it can be useful for getting a good twist value on a curve. We define the twist based on the u tangent of the surface at the follicle location. This twist is propagated down the length of the curve modifying it at each cv such that the twist between cvs is the minimum. In the case of "make curves dynamic" we have no surface, so the start value for the twist is simply a fixed vector relative to the follicle transform. When you assign a pfx brush to a hair system, the pfxHair node internally creates a pfx stroke for each hair, where the normal for each point is this twist vector. Another example that uses this well defined twist is the phone cord tutorial on my blog.
Duncan