Restore $root after exiting submenu with ESC

That way, other commands that depend on $root will still work.