I've found a rendering bug in the Raspberry Pi's GLES driver.
glDrawArrays and glDrawElements appear to coalesce multiple vertices to avoid repeated drawing. (glxx_client.c:draw_arrays_or_elements). When stencilling is enabled with an advanced mode such as GL_INCR or GL_DECR, pixels can be written an incorrect number of times, causing the stencil buffer to not contain the intended result.
I posted a bug report at github. https://github.com/raspberrypi/userland/issues/281