Fixes for protecting root scope.

* Fixed all fringe cases for a child level item getting to the root
level.