Add missing dune_default_include_directories command to the targets in the template generated by duneproject script.
dune_default_include_directories
duneproject
Not setting the include dirs results in strange behavior e.g. wrong config.h files are included.
config.h