do not apply default layout to templates with external engine, fixes #1727