The local type bindings from type annotations in patterns were not being processed correctly, and built-in type/type-functions were getting shadowed in binders.