diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C
index a5bb2a889af2950631de942e3bfd1c0c93c21066..22c49df9c07b5f1e1b7d38aaabc4ba0920eef575 100644
--- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C
+++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C
@@ -112,13 +112,9 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
         addLineDirective(include_, includePtr->startLineNumber(), dict.name());
     }
 
-    // Do not add line directive to options_ (Make/options) since at it is a
-    // single line at this point. Can be fixed.
+    // Do not add line directive to options_ (Make/options) and libs since
+    // they are preprocessed as a single line at this point. Can be fixed.
 
-    if (libsPtr)
-    {
-        addLineDirective(libs_, libsPtr->startLineNumber(), dict.name());
-    }
     if (localPtr)
     {
         addLineDirective(localCode_, localPtr->startLineNumber(), dict.name());