Allow dynamic templates with match_mapping_type but no path_match or match.

As long as we have some selector we're good.

Closes #3814