diff --git a/framaCIRGen_src/ACSLComment.cpp b/framaCIRGen_src/ACSLComment.cpp
index 72e4b97a54272c198f0b3775e3a1024eae322143..6a2c6c4320088e018ffcbaa8d6c93ae2d807ede6 100644
--- a/framaCIRGen_src/ACSLComment.cpp
+++ b/framaCIRGen_src/ACSLComment.cpp
@@ -287,6 +287,7 @@ void ACSLComment::parseGhostGlobal(
   while (!parser->ParseTopLevelDecl(Decl)) {
 #endif
     clang::DeclGroupRef DGR = Decl.get();
+    for (auto decl: DGR) decl->setDeclContext(clangContext);
     consumer->HandleTopLevelDecl(DGR);
   }
   cpp.enableIncrementalProcessing(false);