diff --git a/translators/tmgmt_local/tmgmt_local.module b/translators/tmgmt_local/tmgmt_local.module
index 23cc68e..a53e87b 100644
--- a/translators/tmgmt_local/tmgmt_local.module
+++ b/translators/tmgmt_local/tmgmt_local.module
@@ -844,8 +844,11 @@ function tmgmt_local_capabilities_query($source_language = NULL, $target_languag
   }
 
   // Only consider users that have the 'provide translation services' perm.
+  $query->leftJoin('users_roles', 'ur', 'ur.uid = u.uid');
   $roles = user_roles(TRUE, 'provide translation services');
-  $query->leftJoin('users_roles', 'ur', "ur.uid = u.uid AND ur.rid IN (:roles)", array(':roles' => implode(', ', array_keys($roles))));
+  if (!in_array('authenticated user', $roles)) {
+    $query->condition('ur.rid', array_keys($roles));
+  }
 
   // Add a tag so other modules can alter this query at will.
   $query->addTag('tmgmt_translation_combination');
diff --git a/translators/tmgmt_local/tmgmt_local.test b/translators/tmgmt_local/tmgmt_local.test
index db133c9..ca14a41 100644
--- a/translators/tmgmt_local/tmgmt_local.test
+++ b/translators/tmgmt_local/tmgmt_local.test
@@ -440,6 +440,31 @@ class TMGMTLocalTestCase extends TMGMTBaseTestCase {
 
     $all_translators = array();
 
+    // Create a user that will have removed the translation permissions.
+    $not_translator = $this->drupalCreateUser($this->local_translator_permissions);
+    $this->drupalLogin($not_translator);
+    $edit = array(
+      'tmgmt_translation_skills[und][0][language_from]' => 'en',
+      'tmgmt_translation_skills[und][0][language_to]' => 'ru',
+    );
+    $this->drupalPost('user/' . $not_translator->uid . '/edit', $edit, t('Save'));
+    // Now revoke translation permissions.
+    foreach ($not_translator->roles as $rid => $role) {
+      if ($role != 'authenticated user') {
+        user_role_revoke_permissions($rid, $this->local_translator_permissions);
+        break;
+      }
+    }
+
+    // Test for the case when we have users with capabilities but not with
+    // permissions to translate.
+    $this->assertEqual(tmgmt_local_supported_language_pairs(), array());
+    $local_cache = &drupal_static('tmgmt_local_supported_language_pairs');
+    $local_cache = NULL;
+    $this->assertEqual(tmgmt_local_translators(), array());
+    $local_cache = &drupal_static('tmgmt_local_translators');
+    $local_cache = NULL;
+
     $translator1 = $this->drupalCreateUser($this->local_translator_permissions);
     $all_translators[$translator1->uid] = $translator1->name;
     $this->drupalLogin($translator1);
