fix no error generated when calling glLight{if}[v] inside begin/end (bug 17408)