fixes for applying layer overrides
Merge branch 'hotfix/template_fix'