fix iterator in testsuite helpers