patch 8.2.1770: invalid memory use when using SpellFileMissing autocmd

Problem:    Invalid memory use when using SpellFileMissing autocmd.
Solution:   Add test case. (Dominique Pellé, closes #7036)  Fix using a window
            that was closed.
diff --git a/src/spell.c b/src/spell.c
index 6b431fa..085f317 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -2280,11 +2280,11 @@
 		}
 	    }
     }
+    redraw_win_later(wp, NOT_VALID);
 
 theend:
     vim_free(spl_copy);
     recursive = FALSE;
-    redraw_win_later(wp, NOT_VALID);
     return ret_msg;
 }