Fix app auto-include for templates