Changing the locking on the XBPython executor since it was causing a temporary deadlock preventing scripts from exiting cleanly.