Fixed the template lookup function returning any file matching the template rather than the template itself