diff --git a/src/AliasUniquifier.php b/src/AliasUniquifier.php
index c430f0a..777600b 100644
--- a/src/AliasUniquifier.php
+++ b/src/AliasUniquifier.php
@@ -57,15 +57,6 @@ class AliasUniquifier implements AliasUniquifierInterface {
   protected $aliasManager;
 
   /**
-   * Stores the last matching route name.
-   *
-   * Used to prevent a loop if the same route matches a given pattern.
-   *
-   * @var
-   */
-  protected $lastRouteName;
-
-  /**
    * Creates a new AliasUniquifier.
    *
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
@@ -169,16 +160,9 @@ class AliasUniquifier implements AliasUniquifierInterface {
 
     try {
       $route = $this->urlMatcher->match($path);
-
-      if ($route['_route'] == $this->lastRouteName) {
-        throw new \InvalidArgumentException('The given alias pattern (' . $path . ') always matches the route ' . $this->lastRouteName);
-      }
-
-      $this->lastRouteName = $route['_route'];
-      return TRUE;
+      return isset($route['_route_object']) && ($route['_route_object']->getPath() == $path);
     }
     catch (ResourceNotFoundException $e) {
-      $this->lastRouteName = NULL;
       return FALSE;
     }
   }
