Bug fix in loop collector

In the for statement, the body of for statement was not being traversed due to which nested loops were not being handled.