MODE-2007 fixed

Corrected the check to verify that destination path is actually the root instead of parentNode.
Added a testcase.