I stepped through setting up uniforms for the second created shader. It had a program ID of 6, which is correct (first shader has 1,2 for vert and frag and 3 for programID and same with the second).
I then call
GLuint uniformId = glGetUniformLocation(shader2, "MVP"); glUniformMatrix4fv(uniformId, 1, GL_FALSE, &mat);
uniformId ends up equal to some absurdly large integer. The shader does contain the uniform mat4 MVP variable. If it was shader1 that was bound, this would work fine and uniformId wouldn't be some absurdly large number.
I could just swap the diffuse and passthrough shader around and i'd get the same problem, only the first created one will work.