Update pybind11.h
diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h
index c603a4b..5d86154 100644
--- a/include/pybind11/pybind11.h
+++ b/include/pybind11/pybind11.h
@@ -10,6 +10,11 @@
 
 #pragma once
 
+// Bug in MSVC 2022 requiring this file first
+#if defined(_MSC_VER) && (_MSC_VER >= 1930)
+#include <corecrt.h>
+#endif
+
 #include "attr.h"
 #include "gil.h"
 #include "options.h"
@@ -33,10 +38,6 @@
 #  define PYBIND11_HAS_STD_LAUNDER 0
 #endif
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1930)
-#include <corecrt.h>
-#endif
-
 #if defined(__GNUG__) && !defined(__clang__)
 #  include <cxxabi.h>
 #endif