Fix small bug with finding a variable.

As I moved adding variable to block to the gen-stage, and they were deleted
after a block was executed, it couldn't find variables 'declared' inside of
for/while/times block.