Index: /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 5709)
+++ /trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 5710)
@@ -121,5 +121,4 @@
      * @param name  the name without the id
      * @param primitive the primitive
-     * @return the decorated name
      */
     protected void decorateNameWithId(StringBuilder name, IPrimitive primitive) {
@@ -384,5 +383,7 @@
                 String name2 = getRelationName(r2);
 
-                return ALPHANUM_COMPARATOR.compare(name1, name2);
+                comp = ALPHANUM_COMPARATOR.compare(name1, name2);
+                if (comp != 0)
+                    return comp;
             }
 
