diff --git a/drupal-7.36-custom-locale.patch b/drupal-7.36-custom-locale.patch
index e42db38..c810652 100644
--- a/drupal-7.36-custom-locale.patch
+++ b/drupal-7.36-custom-locale.patch
@@ -1,8 +1,8 @@
 diff --git a/modules/locale/locale.module b/modules/locale/locale.module
-index 768fead..17118ab 100644
+index 5139191..eb50780 100644
 --- a/modules/locale/locale.module
 +++ b/modules/locale/locale.module
-@@ -666,6 +666,25 @@ function locale_modules_disabled($modules) {
+@@ -666,6 +666,33 @@ function locale_modules_disabled($modules) {
   *   Language code to use for the lookup.
   */
  function locale($string = NULL, $context = NULL, $langcode = NULL) {
@@ -12,12 +12,20 @@ index 768fead..17118ab 100644
 +    $custom_locale = variable_get('custom_locale', FALSE);
 +    if ($custom_locale) {
 +      if (!class_exists($custom_locale)) {
-+        watchdog('locale', 'Class %class does not exist', array('%class' => $custom_locale), WATCHDOG_ERROR);
++        // Calling watchdog results in calling hook_watchdog, that might call
++        // t() resulting in calling this function. Because of this we have to
++        // set the static $custom_locale to false before calling watchdog, or
++        // the next time this function is called, it will think that the class
++        // exists.
++        $locale_class = $custom_locale;
 +        $custom_locale = FALSE;
++        watchdog('locale', 'Class %class does not exist', array('%class' => $locale_class), WATCHDOG_ERROR);
 +      }
 +      elseif (!class_implements($custom_locale, 'LocaleInterface')) {
-+        watchdog('locale', 'Class %class does not implement LocaleInterface', array('%class' => $custom_locale), WATCHDOG_ERROR);
++        // See comment above.
++        $locale_class = $custom_locale;
 +        $custom_locale = FALSE;
++        watchdog('locale', 'Class %class does not implement LocaleInterface', array('%class' => $locale_class), WATCHDOG_ERROR);
 +      }
 +    }
 +  }
