Templates: GET templates doesn't honor the `flat_settings` parameter.

Close #6671