I think this is a decision for individual graphics card drivers, not OpenGL itself. Therefore, some will handle redundant changes and others won't -- the only way to be sure would be to test it out (I'll do a quick test later to see for myself!).

I'd err on the side of caution -- after all, your app shouldn't have too many state switches anyway, since you'd use some form of state management in the first place. What's a few more "if" statements versus the real bottleneck (transferring vertex data to video memory, etc.).