Bmesh editing "GPU_indexbuf_add_tri_verts segfault" error

Hi,
I’m getting strange GPU_indexbuf_add_tri_verts error after editing mesh using bmesh.
From debug log i can see that mesh topology is not the issue - but changing polygon material indexes could be.

/blender-28-git/blender/source/blender/gpu/intern/gpu_element.c:148
assert(builder->prim_type == GPU_PRIM_TRIS)

Should i flag the mesh as invalid by hand (an how?) or call any other update / tag function ?