diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index 1819df65669d79adbe18e7edafc58ffd3b90d9f9..ee5db3615262c740ba54e8487ca472d902063c4f 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -15,10 +15,6 @@
  */
 require_once __DIR__ . '/field.purge.inc';
 
-/**
- * @} End of "defgroup field".
- */
-
 /**
  * Assembles a partial entity structure with initial IDs.
  *
diff --git a/core/modules/field/src/Hook/FieldHooks.php b/core/modules/field/src/Hook/FieldHooks.php
index aa759522f458b3980798580ad7f11f4927385977..c6f9f2faf58fc6d2974c0f9abfcfff8524c0cb65 100644
--- a/core/modules/field/src/Hook/FieldHooks.php
+++ b/core/modules/field/src/Hook/FieldHooks.php
@@ -256,6 +256,10 @@ public function entityBundleDelete($entity_type_id, $bundle): void {
     }
   }
 
+  /**
+   * @} End of "defgroup field".
+   */
+
   /**
    * Implements hook_config_import_steps_alter().
    */
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 49996a4a35bb290e03c38dcf3d17b68cf5f1a7e5..4f9a9f0b30d322555e9238d5a8db3110183d561a 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -410,6 +410,11 @@ function node_form_system_themes_admin_form_submit($form, FormStateInterface $fo
     ->save();
 }
 
+/**
+ * @addtogroup node_access
+ * @{
+ */
+
 /**
  * Fetches an array of permission IDs granted to the given user ID.
  *
@@ -673,6 +678,10 @@ function _node_access_rebuild_batch_finished($success, $results, $operations): v
   }
 }
 
+/**
+ * @} End of "addtogroup node_access".
+ */
+
 /**
  * Marks a node to be re-indexed by the node_search plugin.
  *
diff --git a/core/modules/system/src/Hook/SystemHooks.php b/core/modules/system/src/Hook/SystemHooks.php
index 2df70cfa16c0278b92aa0d42ceb13667a7adce0b..dae64aeeddaa499b56bee3ecc803837d1e19bbe0 100644
--- a/core/modules/system/src/Hook/SystemHooks.php
+++ b/core/modules/system/src/Hook/SystemHooks.php
@@ -157,10 +157,6 @@ public function help($route_name, RouteMatchInterface $route_match): ?string {
     return NULL;
   }
 
-  /**
-   * @} End of "defgroup authorize".
-   */
-
   /**
    * Implements hook_updater_info().
    */
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index c7ed1808206f4ca5e21284d6e73d54b69343cdc0..266bce6b6434ae13166efe502c3e6a05a7409cbb 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -306,6 +306,10 @@ function system_authorized_batch_process() {
   return batch_process($finish_url->setAbsolute()->toString(), $process_url);
 }
 
+/**
+ * @} End of "defgroup authorize".
+ */
+
 /**
  * Implements hook_preprocess_HOOK() for block templates.
  */
diff --git a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
index 4cc0a6f6eb613ce32ebdeb0edf1dd40b14a25b49..82a88ce8a198c629a56b9ca916045fed959f5080 100644
--- a/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
+++ b/core/modules/taxonomy/src/Hook/TaxonomyHooks.php
@@ -180,4 +180,9 @@ public function taxonomyTermDelete(Term $term): void {
     }
   }
 
+  // phpcs:ignore Drupal.Commenting.InlineComment.DocBlock
+  /**
+   * @} End of "defgroup taxonomy_index".
+   */
+
 }
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 04c00e36b6c25dc3f18830edcedb8ad44be65d11..28e54b11f71b6b838cf15b50571d9fda945558d9 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -89,6 +89,11 @@ function taxonomy_term_is_page(Term $term) {
   return FALSE;
 }
 
+/**
+ * @addtogroup taxonomy_index
+ * @{
+ */
+
 /**
  * Builds and inserts taxonomy index entries for a given node.
  *
@@ -152,5 +157,5 @@ function taxonomy_delete_node_index(EntityInterface $node): void {
 }
 
 /**
- * @} End of "defgroup taxonomy_index".
+ * @} End of "addtogroup taxonomy_index".
  */