Make sure to gen the frag shader matching the id.

Otherwise, the frag shader might be generated accounting for different
vertexFullAlpha values, or otherwise won't match up with the id, since we
change flags between the two Apply calls.
Merge pull request #6021 from unknownbrackets/gpu-minor

Make sure to gen the frag shader matching the id