Fixed regression causing incomplete gap fill when all configured perimeters were successfully generated. #1589