Use is_root helper in recursive traversal as well