platin: deep clone YAML representation before writing to file, because LLVM's YAML library cannot deal with aliases