Made do-while loop GC safe by popping vars after each iteration.