diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index be2ee137d335cbbd8f63b5fe208a1fb9788e7850..6ead58c9bec852a9f9fcd3a2717b042e0bd5b9e3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,11 @@ before_script:
   - duneci-install-module https://git.imp.fu-berlin.de/agnumpde/dune-fufem.git
   - duneci-install-module https://git.imp.fu-berlin.de/agnumpde/dune-solvers.git
 
+dune:2.7 gcc:
+  image: registry.dune-project.org/docker/ci/dune:2.7-debian-10-gcc-8-17
+  before_script:
+  script: duneci-standard-test
+
 dune:git  clang  C++17:
   image: registry.dune-project.org/docker/ci/dune:git-debian-10-clang-7-libcpp-17
   script: duneci-standard-test
diff --git a/dune/elasticity/materials/localintegralenergy.hh b/dune/elasticity/materials/localintegralenergy.hh
index 6ef381539d8163f6409229c65dcd72631591587d..9acc5c0ef105b679455b673fd3cb7d19c87d0735 100644
--- a/dune/elasticity/materials/localintegralenergy.hh
+++ b/dune/elasticity/materials/localintegralenergy.hh
@@ -2,7 +2,10 @@
 #define DUNE_ELASTICITY_MATERIALS_LOCALINTEGRALENERGY_HH
 
 #include <dune/common/fmatrix.hh>
+#include <dune/common/version.hh>
+#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
 #include <dune/common/transpose.hh>
+#endif
 
 #include <dune/geometry/quadraturerules.hh>
 
@@ -77,7 +80,14 @@ energy(const LocalView& localView,
 
     // compute gradients of base functions
     for (size_t i=0; i<jacobians.size(); ++i)
+#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 8)
       jacobians[i] = jacobians[i] * transpose(geometryJacobianIT);
+#else
+    {
+      auto referenceJacobian = jacobians[i];
+      geometryJacobianIT.mv(referenceJacobian[0], jacobians[i][0]);
+    }
+#endif
 
     // Deformation gradient
     FieldMatrix<field_type,gridDim,gridDim> deformationGradient(0);
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 999e61fe12c6e7ad4af513cae9cdd8090fde0244..bf5393d629333aab234d44cb4e7c29f7a6a6380d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,12 @@
 if(ADOLC_FOUND AND IPOPT_FOUND AND PYTHONLIBS_FOUND AND dune-uggrid_FOUND)
-  set(programs finite-strain-elasticity
-               linear-elasticity)
+  set(programs linear-elasticity)
+
+  # When combining dune-common 2.7 and dune-fufem 2.8, no cmake test for the
+  # Python bindings is ever called (that's not a bug).  In that case
+  # we simply skip building the one executable that needs Python.
+  if(NOT (${dune-common_VERSION} VERSION_LESS_EQUAL "2.7.9" AND ${dune-fufem_VERSION} VERSION_GREATER_EQUAL "2.8.0"))
+    set(programs ${programs} finite-strain-elasticity)
+  endif()
 
   foreach(_program ${programs})
     add_executable(${_program} ${_program}.cc)