diff --git a/dumux/common/geometry/geometricentityset.hh b/dumux/common/geometry/geometricentityset.hh
index 50a921eeb379354a36e8a6a1dc503deca8671627..acc4537516fb1a1bd95e6dcbe7d628b01cd32462 100644
--- a/dumux/common/geometry/geometricentityset.hh
+++ b/dumux/common/geometry/geometricentityset.hh
@@ -25,6 +25,7 @@
 #define DUMUX_GRIDVIEW_GEOMETRIC_ENTITY_SET_HH
 
 #include <memory>
+#include <dune/common/version.hh>
 #include <dune/grid/common/mcmgmapper.hh>
 #include <dumux/common/entitymap.hh>
 
@@ -39,13 +40,21 @@ namespace Dumux {
 template <class GridView, int codim = 0>
 class GridViewGeometricEntitySet
 {
+#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
     using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
+#else
+    // Only works for codim == 0, fixed in dune version 2.6
+    using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>;
+#endif
     using Entity = typename GridView::template Codim<codim>::Entity;
-
 public:
     GridViewGeometricEntitySet(const GridView& gridView)
     : gridView_(gridView)
+#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
     , mapper_(gridView, Dune::mcmgLayout(Dune::Codim<codim>()))
+#else
+    , mapper_(gridView)
+#endif
     , entityMap_(std::make_shared<EntityMap<GridView, codim>>(gridView.grid(), mapper_))
     {}