Declare garray iterators in the for() scope where possible #819