PetScan::set_upper_bounds: fix typo breaking non-1D array declarations in loops