Extended flag gadgets for low-overhead circuit verification