Fix static includes in combination with dynamic template name