Update lexical path to handle greedy templates.