I changed those lines in another PR and forgot to revert these before I submitted it. This will fix the OpenGL errors that appeared when shadows were enabled.