diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 26f11a2..dab8696 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -807,7 +807,7 @@ function node_permission() {
   );
 
   // Generate standard node permissions for all applicable node types.
-  foreach (node_permissions_get_configured_types() as $name => $type) {
+  foreach (node_permissions_get_configured_types() as $type) {
     $perms += node_list_permissions($type);
   }
 
@@ -2264,9 +2264,6 @@ function node_query_node_access_alter(AlterableInterface $query) {
   if (!$op = $query->getMetaData('op')) {
     $op = 'view';
   }
-  if (!$langcode = $query->getMetaData('langcode')) {
-    $langcode = FALSE;
-  }
 
   // If $account can bypass node access, or there are no node access modules,
   // or the operation is 'view' and the $account has a global view grant
