Fixed regression with DummyVertex processing.
Correction test cases for CR23819
 }
 
 //=======================================================================
-static TopoDS_Vertex theDummyVertex (BRepBuilderAPI_MakeVertex(gp_Pnt(0.,0.,0.)).Vertex());
+//function : DummyShapeToStoreOrientation
+//=======================================================================
+static const TopoDS_Shape& DummyShapeToStoreOrientation (const TopAbs_Orientation Or)
+{
+  gp_Pnt aPnt(0,0,0);
+  static TopoDS_Vertex aVForward, aVRev;
+  switch(Or) {
+  case TopAbs_FORWARD:
+    if(aVForward.IsNull()) {
+      aVForward = BRepBuilderAPI_MakeVertex (aPnt).Vertex();
+      aVForward.Orientation(TopAbs_FORWARD);
+    }
+    return aVForward;
+  case TopAbs_REVERSED:
+    if(aVRev.IsNull()) {
+      aVRev = BRepBuilderAPI_MakeVertex (aPnt).Vertex();
+      aVRev.Orientation(TopAbs_REVERSED);
+    }
+    return aVRev;
+  }
+  return aVForward;
+}
 
 //=======================================================================
 //function : Select
   }
 
   TNaming_RefShape* pos;
-  if(S.ShapeType() != TopAbs_VERTEX) {
-    TopoDS_Shape aV = theDummyVertex;
-    aV.Orientation (S.Orientation());
+
+  if(S.ShapeType() != TopAbs_VERTEX && 
+         (S.Orientation() == TopAbs_FORWARD || S.Orientation() == TopAbs_REVERSED)) {
+       const TopoDS_Shape& aV = DummyShapeToStoreOrientation (S.Orientation());
     if (!myShapes->myMap.IsBound(aV)) {
       pos = new TNaming_RefShape(aV);
       myShapes->myMap.Bind(aV,pos);
-    }
-    else
-      pos = myShapes->myMap.ChangeFind(aV);    
+       } else 
+         pos = myShapes->myMap.ChangeFind(aV);
   } else {
     if (!myShapes->myMap.IsBound(InS)) {
       pos = new TNaming_RefShape(InS);
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #1 - create box using more flexible set of commands
 NewCommand D
 set B2 [AddObject D];                  ## add object
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #Drivers' nick-names:
 #Box|Sph|Cyl|Cut|Fuse|Prism|Revol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
 # order of functions recomputation should be defined out of the tool (by end user)
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
 #1 Box creation
 NewCommand D
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
 
 #1 Create Box
 
-puts "TODO ?CR23788 ALL: Failed units"
 AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
 
 #1 Create Box
 
-puts "TODO ?CR23788 ALL: Failed units"
 #1 - create Box using short-cut
 NewCommand D
 AddDriver D Box;                       ## add box driver to driver table
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #Drivers' nick-names:
 #Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
 # order of functions recomputation should be defined out of the tool (by end user)
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #Drivers' nick-names:
 #Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
 # order of functions recomputation should be defined out of the tool (by end user)
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #1 - create Box using short-cut
 NewCommand D
 AddDriver D Box;                       ## add box driver to driver table
 
-puts "TODO ?CR23788 ALL: Failed units"
 AddDriver D Box Cyl Sph Attach XAttach PTxyz PTALine PRLine PMirr Cut Fuse Prism FulRevol SecRevol Fillet
 
 #1 Create Box
 
-puts "TODO ?CR23788 ALL: Failed units"
 #1 - create Box using short-cut
 NewCommand D
 AddDriver D Box;                       ## add box driver to driver table
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #1 - create Box using short-cut
 NewCommand D
 AddDriver D Box;                       ## add box driver to driver table
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 #Drivers' nick-names:
 #Box|Sph|Cyl|Cut|Fuse|Prism|SecRevol|FulRevol|PTxyz|PTALine|PRLine|PMirr|Fillet|Attach|XAttach
 # order of functions recomputation should be defined out of the tool (by end user)
 
-puts "TODO ?CR23788 ALL: Failed units"
 #1 - create 4 Pnts
 NewCommand D
 AddDriver D PntXYZ PntRLT Line3D Attach;
 
-puts "TODO ?CR23788 ALL: Failed units"
-puts "TODO ?CR23788 ALL: DNaming_SolveFlatFrom: Driver failed"
 #1 - create 4 Pnts
 NewCommand D
 AddDriver D PntXYZ PntRLT Line3D Attach;
 
-puts "TODO ?CR23788 ALL: Failed units"
 #1 - create 4 Pnts
 NewCommand D
 AddDriver D PntXYZ PntRLT Line3D Attach;
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # ============= OCAF ============================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # ============= OCAF ============================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # ============= OCAF ============================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # ============= OCAF ============================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # ============= OCAF ============================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #
 
-puts "TODO ?CR23788 ALL: Failed units"
-
 # =================== OCAF ======================
 # Naming
 #