multi-level locking code now compiles