Fix a regression in the typechecking introduced when coding the typed AST elaboration