This is an artifact of the Python code I started from. Python has a bug where acquiring the lock there is needed. I'll fix it.