Fixed matching for templates not starting with tags.