Fix typesystem errors reported by Type Errors Audit build