Fix closure sizing in Python 3.x