The issue here is that we're checking the function literal scope twice. Ideally, we would know that this particular child of the f scope is a function literal that will be type-checked later, so we shouldn't recurse into it in Checker.usage. I haven't found a way to do that.
We could also keep a map of what scopes we have already type-checked to avoid duplicates, but that seems unnecessarily wasteful.
I don't see a clear fix here, so leaving it to someone else. Or, if anyone has any hints, I can have a second go at it.