Fix bug in the type checker (when type checking terms with meta-variables).

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>