Revert "Lock order fixes cherry picked from master"

This reverts commit b560c8690b25fc2824762257ba4829f263e8b1b4.