glPushAttrib and GL_INVALID_OPERATION

Hi all.
I have a problem with glPushAttrib. The docs say that glPushAttrib throws a GL_INVALID_OPERATION if it is called between glBegin and glEnd. Now, i’m getting that error, but i don’t call any glBegin before it. Moreover, it happens if and only if i call it with GL_CURRENT_BIT in the bitmask. Any other bit does not make it throw the error.
Unfortunately i could not reproduce it in a small test app, and the code i’m working on is quite big and, more importantly, not mine, so i don’t really know the internals so much. But i ran it into gDEBugger, and this is the call log. I hope it helps.

Thanks, Giulio