Fix #3603257: UnusedVariable reported for variable used in (more than one) for loop