diff --git a/hdl21/qualname.py b/hdl21/qualname.py
index d8b6b2e..fdcc2b1 100644
--- a/hdl21/qualname.py
+++ b/hdl21/qualname.py
@@ -21,7 +21,7 @@ def qualpath(mod: HasQualPath) -> Optional[List[str]]:
 
     if getattr(mod, "_importpath", None) is not None:
         # Imported. Return the period-separated import path.
-        return mod._importpath
+        return mod._importpath + [mod.name]
 
     if mod.name is None:
         # Unnamed. Return None.