FileLock fixes and simplifications, deadlock avoidance.