diff --git a/dumux/multidomain/embedded/extendedsourcestencil.hh b/dumux/multidomain/embedded/extendedsourcestencil.hh
index ddbc3fee9a995c6170c69d3aea528f3ea942b5fe..96a93f91ef2f611b9077044ac3bbcc773daded55 100644
--- a/dumux/multidomain/embedded/extendedsourcestencil.hh
+++ b/dumux/multidomain/embedded/extendedsourcestencil.hh
@@ -169,7 +169,7 @@ private:
     template<std::size_t id>
     const auto& extendedSourceStencil_(const CouplingManager& couplingManager, Dune::index_constant<id> domainId, const Element<id>& element) const
     {
-        if constexpr (id == bulkIdx())
+        if constexpr (domainId == bulkIdx)
         {
             const auto bulkElementIdx = couplingManager.problem(bulkIdx).gridGeometry().elementMapper().index(element);
             if (sourceStencils_.count(bulkElementIdx))