nitg: fixes iterators crashes for test in 62cdb9a9633767baafb04f66fdad79a46d2e9a69

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>