Crash on shader link after upgrading to the latest driver

We are developing an application running on Linux and rendering with OpenGL.
This applications runs on either a GeForce 780 or K4000M.
Recently we tried to update our driver to the recommended 64 bit driver version which is 352.63 for both GPU’s.
With the updated driver, we get visual corruption on the screen and a crash when trying to link one of our vertex shaders using glLinkProgram. The crashing shader used to work on the previous driver version (346.47).
I was in contact with Mike from NVIDIA Customer Care about this issue, but since its more of a development issue he asked me to open a thread on this forum instead.
The shader that crashes is a vertex shader doing some spline calculation:

#version 330
#line 2

#define PI (3.1415927)

in vec4 rvc_Vertex;
in vec3 rvc_Normal;

uniform mat4 rvc_ModelViewMatrix;
uniform mat4 rvc_ProjectionMatrix;
uniform mat3 rvc_NormalMatrix;
uniform vec3 LightPosition;
uniform vec3 EyePosition;
uniform float TextureYDist;

in vec4 SplineDiffuse;
in float Radius;
in vec3 P1;
in vec3 P2;
in vec3 M1;
in vec3 M2;

out vec3 vViewDirection;
out vec3 vLightDirection;
out vec3 vNormal;
out vec2 vTexCoord;
out vec4 vSplineDiffuse;

flat out int vIsEndCap;

#define EPSILON 0.000001

void fromToRotation(in vec3 from, in vec3 to, out mat3 mtx) 
{
  vec3 v;
  float e, h, f;
   
  v = cross(from, to);
  e = dot(from, to);
  f = (e < 0.0) ? -e : e;
  if (f > 1.0 - EPSILON)     /* 'from' and 'to'-vector almost parallel */
  {
    vec3 u, v; /* temporary storage vectors */
    vec3 x;       /* vector most nearly orthogonal to 'from' */
    float c1, c2, c3; /* coefficients for later use */
    int i, j;

    x[0] = (from[0] > 0.0)? from[0] : -from[0];
    x[1] = (from[1] > 0.0)? from[1] : -from[1];
    x[2] = (from[2] > 0.0)? from[2] : -from[2];

    if (x[0] < x[1])
    {
      if (x[0] < x[2])
      {
        x[0] = 1.0; x[1] = x[2] = 0.0;
      }
      else
      {
        x[2] = 1.0; x[0] = x[1] = 0.0;
      }
    }
    else
    {
      if (x[1] < x[2])
      {
        x[1] = 1.0; x[0] = x[2] = 0.0;
      }
      else
      {
        x[2] = 1.0; x[0] = x[1] = 0.0;
      }
    }

    u[0] = x[0] - from[0]; u[1] = x[1] - from[1]; u[2] = x[2] - from[2];
    v[0] = x[0] - to[0];   v[1] = x[1] - to[1];   v[2] = x[2] - to[2];

    c1 = 2.0 / dot(u, u);
    c2 = 2.0 / dot(v, v);
    c3 = c1 * c2  * dot(u, v);

    mtx[0][0] =  - c1 * u[0] * u[0]
                 - c2 * v[0] * v[0]
                 + c3 * v[0] * u[0];
    mtx[0][0] += 1.0;
    mtx[0][1] =  - c1 * u[0] * u[1]
                 - c2 * v[0] * v[1]
                 + c3 * v[0] * u[1];
    mtx[0][2] =  - c1 * u[0] * u[2]
                 - c2 * v[0] * v[2]
                 + c3 * v[0] * u[2];
                                 
    mtx[1][0] =  - c1 * u[1] * u[0]
                 - c2 * v[1] * v[0]
                 + c3 * v[1] * u[0];
    mtx[1][1] =  - c1 * u[1] * u[1]
                 - c2 * v[1] * v[1]
                 + c3 * v[1] * u[1];
    mtx[1][1] += 1.0;
    mtx[1][2] =  - c1 * u[1] * u[2]
                 - c2 * v[1] * v[2]
                 + c3 * v[1] * u[2];
                    
    mtx[2][0] =  - c1 * u[2] * u[0]
                 - c2 * v[2] * v[0]
                 + c3 * v[2] * u[0];
    mtx[2][1] =  - c1 * u[2] * u[1]
                 - c2 * v[2] * v[1]
                 + c3 * v[2] * u[1];
    mtx[2][2] =  - c1 * u[2] * u[2]
                 - c2 * v[2] * v[2]
                 + c3 * v[2] * u[2];   
   mtx[2][2] += 1.0;

  }
  else
  {
    float hvx, hvz, hvxy, hvxz, hvyz;
    h = 1.0/(1.0 + e);
    hvx = h * v[0];
    hvz = h * v[2];
    hvxy = hvx * v[1];
    hvxz = hvx * v[2];
    hvyz = hvz * v[1];
    mtx[0][0] = e + hvx * v[0];
    mtx[0][1] = hvxy - v[2];
    mtx[0][2] = hvxz + v[1];

    mtx[1][0] = hvxy + v[2];
    mtx[1][1] = e + h * v[1] * v[1];
    mtx[1][2] = hvyz - v[0];

    mtx[2][0] = hvxz - v[1];
    mtx[2][1] = hvyz + v[0];
    mtx[2][2] = e + hvz * v[2];
  }
}
   
void main( void )
{
   vec3 N = vec3(0.0, 0.0, 1.0);
                            
   vec3 D = rvc_Vertex.xyz - vec3(0.0, 0.0, rvc_Vertex.z); 
   float lengthD = sqrt(dot(D,D));
   D = normalize(D);
                                     
   float t = rvc_Vertex.z;
   float tSq = (t * t);
   float tCub = (t * t * t);
   
   float segDist = sqrt ( dot(P2 - P1, P2 - P1) );
   vec3 Tan1 = normalize(M1) * segDist;
   vec3 Tan2 = normalize(M2) * segDist;
   
   
   vec3 Pos = (2.0 * tCub - 3.0 * tSq + 1.0) * P1 +
              (tCub - 2.0 * tSq + t) * Tan1 +
              (-2.0 * tCub + 3.0 * tSq) * P2 +
              (tCub - tSq) * Tan2;
              
   
   vTexCoord.x = acos(rvc_Vertex.x) / (2 * 3.14159);
   vTexCoord.y = (segDist / TextureYDist) * rvc_Vertex.z;
   
   vec3 Tan = (6.0 * tSq - 6.0 * t) * P1 +
              (3.0 * tSq - 4.0 * t + 1.0) * Tan1 +
              (-6.0 * tSq + 6.0 * t) * P2 +
              (3.0 * tSq - 2.0 * t) * Tan2;
   Tan = normalize(Tan);              
                                          
   mat3 R;                 
   fromToRotation(normalize(N), Tan, R);               
    
   vec3 rotatedD = D * R;  
   vec3 rotatedNormal = rvc_Normal * R;
                                   
   Pos += normalize(rotatedD) * Radius * lengthD;

   vec4 ObjectPosition = rvc_ModelViewMatrix *  vec4(Pos, 1.0);
   
   gl_Position = rvc_ProjectionMatrix * ObjectPosition;
       
   vViewDirection  = EyePosition - ObjectPosition.xyz;
   vLightDirection = LightPosition - ObjectPosition.xyz;
   vNormal         = rvc_NormalMatrix * rotatedNormal;

   vIsEndCap = 0;
   if ((rvc_Normal.x == 0.0 && rvc_Normal.y == 0.0) && (rvc_Normal.z == 1.0 || rvc_Normal.z == -1.0))
   {
      vIsEndCap = 1;
   }  

   vSplineDiffuse = SplineDiffuse;
}
;

As mentioned above, all I do is compile the shader and try to link it using glLinkProgram which worked fine with the older driver. The crash stack trace is a few good levels deep into libnvidia-glcore.so.352.21 (obviously I don’t have the symboles so I can’t provide anything more).
While I may be able to avoid the crash by changing the shader, it does compile, so I would rather keep it the way it is.
Any ideas as to what may be causing this crash?