It would probably be easier to fix if you used the templates-custom directory. You could just make blank copies of all the template files in templates-custom, and add one fragment that contained the whole file you wanted to use. This would make a new smb.conf from your blank files instead of the defaults, plus whatever you had in your own fragment.