Implement basic node locking.

- Add support for deep locking.

Resolves: https://www.pivotaltracker.com/story/show/66093788