Index: prj-proc.adb
===================================================================
--- prj-proc.adb	(revision 216970)
+++ prj-proc.adb	(working copy)
@@ -2765,6 +2765,10 @@
             Success := not Prj.Tree.No (Loaded_Project);
 
             if Success then
+               if Node_Tree.Incomplete_With then
+                  From_Project_Node_Tree.Incomplete_With := True;
+               end if;
+
                List.Tree := new Project_Tree_Data (Is_Root_Tree => False);
                Prj.Initialize (List.Tree);
                List.Tree.Shared := In_Tree.Shared;
@@ -2928,9 +2932,9 @@
             Name : constant Name_Id :=
                      Name_Of (From_Project_Node, From_Project_Node_Tree);
 
-            Name_Node : constant Tree_Private_Part.Project_Name_And_Node :=
-                          Tree_Private_Part.Projects_Htable.Get
-                            (From_Project_Node_Tree.Projects_HT, Name);
+            Display_Name : constant Name_Id :=
+                             Display_Name_Of
+                               (From_Project_Node, From_Project_Node_Tree);
 
          begin
             Project := Processed_Projects.Get (Name);
@@ -2994,15 +2998,8 @@
             Processed_Projects.Set (Name, Project);
 
             Project.Name := Name;
+            Project.Display_Name := Display_Name;
 
-            --  Make sure that the project display name is never No_Name
-
-            if Name_Node.Display_Name = No_Name then
-               Project.Display_Name := Name;
-            else
-               Project.Display_Name := Name_Node.Display_Name;
-            end if;
-
             Get_Name_String (Name);
 
             --  If name starts with the virtual prefix, flag the project as
Index: prj-part.adb
===================================================================
--- prj-part.adb	(revision 216965)
+++ prj-part.adb	(working copy)
@@ -1298,7 +1298,6 @@
       Name_From_Path  : constant Name_Id :=
         Project_Name_From (Path_Name, Is_Config_File => Is_Config_File);
       Name_Of_Project : Name_Id := No_Name;
-      Display_Name_Of_Project : Name_Id := No_Name;
 
       Duplicated : Boolean := False;
 
@@ -1634,11 +1633,11 @@
             end if;
          end;
 
-         --  Read the original casing of the project name
+         --  Read the original casing of the project name and put it in the
+         --  project node.
 
          declare
             Loc : Source_Ptr;
-
          begin
             Loc := Location_Of (Project, In_Tree);
             for J in 1 .. Name_Len loop
@@ -1646,7 +1645,7 @@
                Loc := Loc + 1;
             end loop;
 
-            Display_Name_Of_Project := Name_Find;
+            Set_Display_Name_Of (Project, In_Tree, Name_Find);
          end;
 
          declare
@@ -2018,7 +2017,6 @@
            (T => In_Tree.Projects_HT,
             K => Name_Of_Project,
             E => (Name           => Name_Of_Project,
-                  Display_Name   => Display_Name_Of_Project,
                   Node           => Project,
                   Resolved_Path  => Resolved_Path_Name,
                   Extended       => Extended,
Index: prj-tree.adb
===================================================================
--- prj-tree.adb	(revision 216925)
+++ prj-tree.adb	(working copy)
@@ -110,26 +110,27 @@
          Project_Node_Table.Increment_Last (In_Tree.Project_Nodes);
          In_Tree.Project_Nodes.Table
            (Project_Node_Table.Last (In_Tree.Project_Nodes)) :=
-           (Kind      => N_Comment_Zones,
-            Qualifier => Unspecified,
-            Expr_Kind => Undefined,
-            Location  => No_Location,
-            Directory => No_Path,
-            Variables => Empty_Node,
-            Packages  => Empty_Node,
-            Pkg_Id    => Empty_Package,
-            Name      => No_Name,
-            Src_Index => 0,
-            Path_Name => No_Path,
-            Value     => No_Name,
-            Default   => Empty_Value,
-            Field1    => Empty_Node,
-            Field2    => Empty_Node,
-            Field3    => Empty_Node,
-            Field4    => Empty_Node,
-            Flag1     => False,
-            Flag2     => False,
-            Comments  => Empty_Node);
+           (Kind         => N_Comment_Zones,
+            Qualifier    => Unspecified,
+            Expr_Kind    => Undefined,
+            Location     => No_Location,
+            Directory    => No_Path,
+            Variables    => Empty_Node,
+            Packages     => Empty_Node,
+            Pkg_Id       => Empty_Package,
+            Name         => No_Name,
+            Display_Name => No_Name,
+            Src_Index    => 0,
+            Path_Name    => No_Path,
+            Value        => No_Name,
+            Default      => Empty_Value,
+            Field1       => Empty_Node,
+            Field2       => Empty_Node,
+            Field3       => Empty_Node,
+            Field4       => Empty_Node,
+            Flag1        => False,
+            Flag2        => False,
+            Comments     => Empty_Node);
 
          Zone := Project_Node_Table.Last (In_Tree.Project_Nodes);
          In_Tree.Project_Nodes.Table (To).Comments := Zone;
@@ -170,6 +171,7 @@
                Packages         => Empty_Node,
                Pkg_Id           => Empty_Package,
                Name             => No_Name,
+               Display_Name     => No_Name,
                Src_Index        => 0,
                Path_Name        => No_Path,
                Value            => Comments.Table (J).Value,
@@ -339,6 +341,7 @@
          Packages         => Empty_Node,
          Pkg_Id           => Empty_Package,
          Name             => No_Name,
+         Display_Name     => No_Name,
          Src_Index        => 0,
          Path_Name        => No_Path,
          Value            => No_Name,
@@ -432,6 +435,7 @@
          Packages         => Empty_Node,
          Pkg_Id           => Empty_Package,
          Name             => No_Name,
+         Display_Name     => No_Name,
          Src_Index        => 0,
          Path_Name        => No_Path,
          Value            => No_Name,
@@ -469,6 +473,7 @@
                Packages         => Empty_Node,
                Pkg_Id           => Empty_Package,
                Name             => No_Name,
+               Display_Name     => No_Name,
                Src_Index        => 0,
                Path_Name        => No_Path,
                Value            => No_Name,
@@ -504,6 +509,7 @@
                   Packages         => Empty_Node,
                   Pkg_Id           => Empty_Package,
                   Name             => No_Name,
+                  Display_Name     => No_Name,
                   Src_Index        => 0,
                   Path_Name        => No_Path,
                   Value            => Comments.Table (J).Value,
@@ -1225,6 +1231,22 @@
       return In_Tree.Project_Nodes.Table (Node).Name;
    end Name_Of;
 
+   ---------------------
+   -- Display_Name_Of --
+   ---------------------
+
+   function Display_Name_Of
+     (Node    : Project_Node_Id;
+      In_Tree : Project_Node_Tree_Ref) return Name_Id
+   is
+   begin
+      pragma Assert
+        (Present (Node)
+         and then
+         In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
+      return In_Tree.Project_Nodes.Table (Node).Display_Name;
+   end Display_Name_Of;
+
    --------------------
    -- Next_Case_Item --
    --------------------
@@ -2424,6 +2446,23 @@
       In_Tree.Project_Nodes.Table (Node).Name := To;
    end Set_Name_Of;
 
+   -------------------------
+   -- Set_Display_Name_Of --
+   -------------------------
+
+   procedure Set_Display_Name_Of
+     (Node    : Project_Node_Id;
+      In_Tree : Project_Node_Tree_Ref;
+      To      : Name_Id)
+   is
+   begin
+      pragma Assert
+        (Present (Node)
+         and then
+         In_Tree.Project_Nodes.Table (Node).Kind = N_Project);
+      In_Tree.Project_Nodes.Table (Node).Display_Name := To;
+   end Set_Display_Name_Of;
+
    -------------------------------
    -- Set_Next_Declarative_Item --
    -------------------------------
@@ -2949,6 +2988,7 @@
    begin
       Project := Default_Project_Node (In_Tree, N_Project);
       Set_Name_Of (Project, In_Tree, Name);
+      Set_Display_Name_Of (Project, In_Tree, Name);
       Set_Directory_Of
         (Project, In_Tree,
          Path_Name_Type (Get_Directory (File_Name_Type (Full_Path))));
@@ -2968,7 +3008,6 @@
             Name,
             Prj.Tree.Tree_Private_Part.Project_Name_And_Node'
               (Name           => Name,
-               Display_Name   => Name,
                Resolved_Path  => No_Path,
                Node           => Project,
                Extended       => False,
Index: prj-tree.ads
===================================================================
--- prj-tree.ads	(revision 216925)
+++ prj-tree.ads	(working copy)
@@ -269,6 +269,12 @@
    --  Valid for all non empty nodes. May return No_Name for nodes that have
    --  no names.
 
+   function Display_Name_Of
+     (Node    : Project_Node_Id;
+      In_Tree : Project_Node_Tree_Ref) return Name_Id;
+   pragma Inline (Display_Name_Of);
+   --  Valid only for N_Project node. Returns the display name of the project.
+
    function Kind_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref) return Project_Node_Kind;
@@ -738,8 +744,15 @@
       In_Tree : Project_Node_Tree_Ref;
       To      : Name_Id);
    pragma Inline (Set_Name_Of);
-   --  Valid for all non empty nodes.
+   --  Valid for all non empty nodes
 
+   procedure Set_Display_Name_Of
+     (Node    : Project_Node_Id;
+      In_Tree : Project_Node_Tree_Ref;
+      To      : Name_Id);
+   pragma Inline (Set_Display_Name_Of);
+   --  Valid only for N_Project nodes
+
    procedure Set_Kind_Of
      (Node    : Project_Node_Id;
       In_Tree : Project_Node_Tree_Ref;
@@ -1159,6 +1172,9 @@
          Directory : Path_Name_Type := No_Path;
          --  Only for N_Project
 
+         Display_Name : Name_Id := No_Name;
+         --  Only for N_Project
+
          Expr_Kind : Variable_Kind := Undefined;
          --  See below for what Project_Node_Kind it is used
 
@@ -1479,9 +1495,6 @@
          Name : Name_Id;
          --  Name of the project
 
-         Display_Name : Name_Id;
-         --  The name of the project as it appears in the .gpr file
-
          Node : Project_Node_Id;
          --  Node of the project in table Project_Nodes
 
@@ -1502,7 +1515,6 @@
 
       No_Project_Name_And_Node : constant Project_Name_And_Node :=
         (Name           => No_Name,
-         Display_Name   => No_Name,
          Node           => Empty_Node,
          Resolved_Path  => No_Path,
          Extended       => True,
