Localize context variables used by templates.