Fixed overwriting of YAML data in recursive traversal