diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index d92e27c..98412c7 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1300,7 +1300,7 @@ function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG
 
   // It is possible that the error handling will itself trigger an error. In that case, we could
   // end up in an infinite loop. To avoid that, we implement a simple static semaphore.
-  if (!$in_error_state && function_exists('module_implements')) {
+  if (!$in_error_state && class_exists('\Drupal') && \Drupal::hasService('module_handler')) {
     $in_error_state = TRUE;
 
     // The user object may not exist in all conditions, so 0 is substituted if needed.
@@ -1841,31 +1841,6 @@ function drupal_get_bootstrap_phase() {
 }
 
 /**
- * Returns the list of enabled modules.
- *
- * @deprecated as of Drupal 8.0. Use
- *   \Drupal::moduleHandler()->getModuleList().
- *
- * @see \Drupal\Core\Extension\ModuleHandler::getModuleList()
- */
-function module_list() {
-  $modules = array_keys(\Drupal::moduleHandler()->getModuleList());
-  return array_combine($modules, $modules);
-}
-
-/**
- * Determines which modules are implementing a hook.
- *
- * @deprecated as of Drupal 8.0. Use
- *   \Drupal::moduleHandler()->getImplementations($hook).
- *
- * @see \Drupal\Core\Extension\ModuleHandler::getImplementations()
- */
-function module_implements($hook) {
-  return \Drupal::moduleHandler()->getImplementations($hook);
-}
-
-/**
  * Invokes a hook in a particular module.
  *
  * All arguments are passed by value. Use drupal_alter() if you need to pass
@@ -1928,18 +1903,6 @@ function module_exists($module) {
 }
 
 /**
- * Determines whether a module implements a hook.
- *
- * @deprecated as of Drupal 8.0. Use
- *   \Drupal::moduleHandler()->implementsHook($module, $hook).
- *
- * @see \Drupal\Core\Extension\ModuleHandler::implementsHook()
- */
-function module_hook($module, $hook) {
-  return \Drupal::moduleHandler()->implementsHook($module, $hook);
-}
-
-/**
  * Returns the test prefix if this is an internal request from SimpleTest.
  *
  * @param string $new_prefix
