Add sanity check for Cg/GLSL attrib indices.