diff --git a/src/macro/Directives.cc b/src/macro/Directives.cc
index 899399b6e1fd6afaabc65d578c65f018d68bf295..eb7ad24e9c360147ec5b5fb1e5b07fbcf5752592 100644
--- a/src/macro/Directives.cc
+++ b/src/macro/Directives.cc
@@ -100,7 +100,7 @@ IncludePath::interpret(ostream &output, bool no_line_macro, vector<filesystem::p
         throw StackTrace(ip.string() + " does not evaluate to a valid directory");
       if (!exists(ip))
         warning(StackTrace("@#includepath", ip.string() + " does not exist", location));
-      paths.emplace_back(*msp);
+      paths.emplace_back(ip);
     }
   catch (StackTrace &ex)
     {