Fix possible hangs under load from blocking under lock