Move template version checks to the grammar walk.