See Jukka's note in #1433 (comment)
After the fix, the exported types aren't correct for generic functions in unannotated code. However, we don't rely on these types anywhere, so I'd suggest merging this PR and creating a new issue for fixing the exported types that refers to this PR.