diff -u b/core/modules/user/user.module b/core/modules/user/user.module
--- b/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -1373,11 +1373,9 @@
       '#heading' => t('User account actions'),
       'user_links' => array(
         '#cache' => [
-          'contexts' => [
-            // Cacheable per "authenticated or not", because the links to
-            // display depend on that.
-            Cache::mergeContexts('user.roles:authenticated', $links_cache_contexts),
-          ],
+          // Cacheable per "authenticated or not", because the links to
+          // display depend on that.
+          'contexts' => Cache::mergeContexts(array('user.roles:authenticated'), $links_cache_contexts),
         ],
         '#theme' => 'links__toolbar_user',
         '#links' => $links,
