Fixes a crasher and another potential bug in the locking algo.

If a node doesn't have any children, getChildren will fail with 'no node'. If we get an error from getChildren, don't attempt to lock and bubble up an error.

Also, instead of calling `_watch()` to create a new watch to attach the callback to, add a setter to avoid creating a duplicate watch.