Fix 2576 properly this time. 

Fix #2576 properly this time by creating a stack of viewports pushed and popped along with the glAttribs.
Thanks to @robn for figuring out the actual cause of the bug.