patch 8.2.0402: setting local instead of global flag

Problem:    Setting local instead of global flag.
Solution:   Prepend "g:" to "test_is_flaky".
diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim
index 14863f9..8ea708a 100644
--- a/src/testdir/screendump.vim
+++ b/src/testdir/screendump.vim
@@ -25,7 +25,7 @@
   let testfile = 'failed/' . a:filename . '.dump'
 
   " Starting a terminal to make a screendump is always considered flaky.
-  let test_is_flaky = 1
+  let g:test_is_flaky = 1
 
   " Redraw to execute the code that updates the screen.  Otherwise we get the
   " text and attributes only from the internal buffer.
diff --git a/src/testdir/term_util.vim b/src/testdir/term_util.vim
index c9e0ac5..dd1f71d 100644
--- a/src/testdir/term_util.vim
+++ b/src/testdir/term_util.vim
@@ -94,7 +94,7 @@
   endtry
 
   " Starting a terminal to run Vim is always considered flaky.
-  let test_is_flaky = 1
+  let g:test_is_flaky = 1
 
   return buf
 endfunc
@@ -102,7 +102,7 @@
 " Stop a Vim running in terminal buffer "buf".
 func StopVimInTerminal(buf)
   " Using a terminal to run Vim is always considered flaky.
-  let test_is_flaky = 1
+  let g:test_is_flaky = 1
 
   call assert_equal("running", term_getstatus(a:buf))
 
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 84c46cf..e5dec89 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -1869,7 +1869,7 @@
   CheckFeature terminal
   CheckNotGui
   " Starting a terminal to run Vim is always considered flaky.
-  let test_is_flaky = 1
+  let g:test_is_flaky = 1
 
   " Prepare file for TextChanged event.
   call writefile([''], 'Xchanged.txt')
diff --git a/src/version.c b/src/version.c
index b18307b..c76d312 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    402,
+/**/
     401,
 /**/
     400,