Make sure templates are never evaluated on their own

fixes #7536