Fix YAML generation to not permit marking of duplicate nodes.

Make previous commit ISO C compliant