Move variable declaration to top of function scope.