gl2: fix typo/bug with stencil testing in state guarding code.