Move a local variable into while-loop scope.