diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php
index 9c660e8..2673ccd 100644
--- a/core/lib/Drupal/Core/Routing/RouteProvider.php
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php
@@ -223,21 +223,25 @@ public function getCandidateOutlines(array $parts) {
    * {@inheritdoc}
    */
   public function getRoutesByPattern($pattern) {
-    $path = RouteCompiler::getPatternOutline($pattern);
+    $outline = RouteCompiler::getPatternOutline($pattern);
 
-    return $this->getRoutesByPath($path);
+    $routes = $this->connection->query("SELECT name, route FROM {" . $this->connection->escapeTable($this->tableName) . "} WHERE pattern_outline = :outline ORDER BY fit DESC", array(
+      ':outline' => $outline,
+    ))
+      ->fetchAllKeyed();
+    $collection = new RouteCollection();
+    foreach ($routes as $name => $route) {
+      $route = unserialize($route);
+      $collection->add($name, $route);
+    }
+
+    return $collection;
   }
 
   /**
-   * Get all routes which match a certain pattern.
-   *
-   * @param string $path
-   *   The route pattern to search for (contains % as placeholders).
-   *
-   * @return \Symfony\Component\Routing\RouteCollection
-   *   Returns a route collection of matching routes.
+   * {@inheritdoc}
    */
-  protected function getRoutesByPath($path) {
+  public function getRoutesByPath($path) {
     // Filter out each empty value, though allow '0' and 0, which would be
     // filtered out by empty().
     $parts = array_slice(array_filter(explode('/', $path), function($value) {
diff --git a/core/lib/Drupal/Core/Routing/RouteProviderInterface.php b/core/lib/Drupal/Core/Routing/RouteProviderInterface.php
index aa0375f..186c658 100644
--- a/core/lib/Drupal/Core/Routing/RouteProviderInterface.php
+++ b/core/lib/Drupal/Core/Routing/RouteProviderInterface.php
@@ -28,4 +28,15 @@
    */
   public function getRoutesByPattern($pattern);
 
+  /**
+   * Get all routes which match a certain path.
+   *
+   * @param string $path
+   *   The route path to match (a concrete path with no placeholders).
+   *
+   * @return \Symfony\Component\Routing\RouteCollection
+   *   Returns a route collection of matching routes.
+   */
+  public function getRoutesByPath($path);
+
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
index 1eafdf6..48359ad 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Routing/RouteProviderTest.php
@@ -326,7 +326,7 @@ function testOutlinePathNoMatch() {
     $request = Request::create($path, 'GET');
 
     try {
-      $routes = $provider->getRoutesByPattern($path);
+      $routes = $provider->getRoutesByPath($path);
       $this->assertFalse(count($routes), 'No path found with this pattern.');
 
       $provider->getRouteCollectionForRequest($request);
