Revert "Revert "Fix expansion of root""
This reverts commit de2fa4b50a20409575f90d0644cc08d1fbe5849a.