As this corrects when using the classic template it must reside in a file that is in an override folder and not one of the files that would normally used(core) for the rest of the templates unless also overridden.

So begin with only the files that are in your folders that you have created for your template name.