Fix semantic action for for loop