I think Cg is just getting confused by too many values to interpolate between vertex fragment programs. Light/shadow stuff (LIGHTING_COORDS) uses 0 to 3 texture interpolators. And you want to use 6 more, which does not fit into 8 texture interpolators.
Maybe you can pack some things into float4’s? Or interpolate something in the color interpolator (e.g. float4 vertexColor : COLOR0)?
Thanks… I solved the problem by moving the LIGHT_COORDS all the way down. Now I don’t get error messages when using TEXCOORD0 or COLOR0 anymore. But packing some things into float4s might be a good solution too… I’ll try that next time.