patch 8.2.2465: using freed memory in :psearch

Problem:    Using freed memory in :psearch. (houyunsong)
Solution:   Check the current window is still valid.  Fix flaky test.
diff --git a/src/version.c b/src/version.c
index a93b81a..7f67230 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2465,
+/**/
     2464,
 /**/
     2463,