s3: Fix handling of processes that died in g_lock