glsl/linker: Use correct array length when linking inter-stage uniforms and varyings.