diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 978f99d0ac72fc980a6bace19fa86c42b556d6ee..32009212d1989510887186615aeffce4cf6f0bb9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,7 @@
 
 Libraries 8.x-3.x, xxxx-xx-xx
 -----------------------------
+#2606420 by googletorp, tstoeckler: Fix profile library detection
 #2090623 by tstoeckler: Add an external library registry
 #2572401 by rjacobs, yas: Fix missing @group annotation in PhpFileLibraryTest
 #2090623 by tstoeckler: Add a test for PHP file loading
diff --git a/libraries.module b/libraries.module
index 4e5cc3923de5b3b7bbc1d527508f8e13d6c0838d..198e4832deaf050df7cab770f5a56e8fd16b35de 100644
--- a/libraries.module
+++ b/libraries.module
@@ -82,8 +82,8 @@ function libraries_get_libraries() {
   // profile, installation profiles may want to place libraries into a
   // 'libraries' directory.
   if ($profile = drupal_get_profile()) {
-    drupal_get_path('profile', $profile);
-    $searchdir[] = "$profile/libraries";
+    $profile_path = drupal_get_path('profile', $profile);
+    $searchdir[] = "$profile_path/libraries";
   };
 
   // Search sites/all/libraries for backwards-compatibility.