A fix has been committed to Mesa CVS. It will be included in the 6.3.2 release,
and it will also be in X.org 6.9 / 7.0. I also added a simple regression test
for this bug, which is located in progs/tests/bug_3195.c.