Set 'NA' as the default value for missing fields in the output template (fixes #1931)