diff --git a/dune/common/geometrytype.hh b/dune/common/geometrytype.hh
index 0a21cfd792534a4146f6c06a419ce7039125183b..80de44bac3628dd16d392a91ad3323ced1dcdbba 100644
--- a/dune/common/geometrytype.hh
+++ b/dune/common/geometrytype.hh
@@ -289,9 +289,7 @@ namespace Dune {
       return ( ( none_ == other.none_ )
                && ( ( none_ == true )
                     || ( ( dim_ == other.dim_ )
-                         && ( ( dim_ < 2 )
-                              || ( topologyId_ == other.topologyId_ )
-                              )
+                         && ( (topologyId_ >> 1) == (other.topologyId_ >> 1) )
                          )
                     )
                );
@@ -307,8 +305,8 @@ namespace Dune {
       return ( ( none_ < other.none_ )
                || ( !( other.none_ < none_ )
                     && ( ( dim_ < other.dim_ )
-                         || ( !( other.dim_ < dim_ )
-                              && ( topologyId_ < other.topologyId_ )
+                         || ( (other.dim_ == dim_)
+                              && ((topologyId_ >> 1) < (other.topologyId_ >> 1) )
                               )
                          )
                     )