diff --git a/modules/shortcut/shortcut.install b/modules/shortcut/shortcut.install
index 209a907..15ac803 100644
--- a/modules/shortcut/shortcut.install
+++ b/modules/shortcut/shortcut.install
@@ -32,8 +32,15 @@ function shortcut_install() {
  * Implements hook_uninstall().
  */
 function shortcut_uninstall() {
+  // Get all shortcut sets. Note that we're accessing the DB directly here
+  // instead of calling shortcut_sets() because the .module file may not be
+  // loaded at this point.
+  $shortcut_sets = db_select('shortcut_set', 'ss')
+    ->fields('ss')
+    ->execute()
+    ->fetchAllAssoc('set_name');
   // Delete the menu links associated with each shortcut set.
-  foreach (shortcut_sets() as $shortcut_set) {
+  foreach ($shortcut_sets as $shortcut_set) {
     menu_delete_links($shortcut_set->set_name);
   }
 }
