Fix check for pickling closures

In #5761 I added actual support for closures, which I don't want to backport. But I do want 2.x to get this simpler fix for the bug where we are too aggressive about preventing pickling of closures. Only closures on the outer-most function don't work; internal closures that fully resolve should still be fine, which comes up in often in list comprehensions in Python 3.