Fix assertions-enabled build.

needsCodegen was moved to TemplateInstance in 2.066.1.