Those black objects could well be bug 96512. We may have to revisit it somehow. Meanwhile, the first incorrect rendering of the issue here happens @514365 with program 3332, vertex shader source @79150, fragment shader @79234. There's no shadow sampling involved, so it must be a different bug.