fix generation of lexical restrictions following template options for CF templates