diff --git a/dune/istl/paamg/test/galerkintest.cc b/dune/istl/paamg/test/galerkintest.cc
index 67e0caed7bb1652919bda55b1b03dacc4f7c424f..0c068a18dd21e10f7211c51a69c007c30a9edbde 100644
--- a/dune/istl/paamg/test/galerkintest.cc
+++ b/dune/istl/paamg/test/galerkintest.cc
@@ -45,7 +45,7 @@ void testCoarsenIndices(int N)
 
   BCRSMat mat = setupAnisotropic2d<BS>(N, indices, cc, &n);
 
-  pinfo.remoteIndices().rebuild<false>();
+  pinfo.remoteIndices().template rebuild<false>();
 
   typedef Dune::Amg::MatrixGraph<BCRSMat> MatrixGraph;
   typedef Dune::Amg::SubGraph<Dune::Amg::MatrixGraph<BCRSMat>,std::vector<bool> > SubGraph;