Fix typechecker bug with type synonyms in type annotations