diff --git a/subpathauto.module b/subpathauto.module
index 4fd2eda..96d4d4f 100644
--- a/subpathauto.module
+++ b/subpathauto.module
@@ -22,8 +22,17 @@ function subpathauto_menu() {
 function subpathauto_url_inbound_alter(&$path, $original_path, $language) {
   // If the current menu item exists at this path, then we should not continue
   // processing.
-  $item = menu_get_item($path);
-  if (!empty($item) && $item['href'] == $path) {
+  $original_map = arg(NULL, $path);
+
+  $parts = array_slice($original_map, 0, MENU_MAX_PARTS);
+  $ancestors = menu_get_ancestors($parts);
+  $router_item = db_query_range('SELECT * FROM {menu_router} WHERE path IN (:ancestors) ORDER BY fit DESC', 0, 1, array(':ancestors' => $ancestors))->fetchAssoc();
+
+  if ($router_item) {
+    _menu_translate($router_item, $original_map);
+  }
+
+  if (!empty($router_item) && (isset($router_item['href']) && $router_item['href'] == $path)) {
     return FALSE;
   }
 
