fix Issue 8238 - templates can create ghost fields
Merge pull request #1054 from 9rnsr/fix8238

Issue 8238 - templates can create ghost fields