[YAMLTraits] Use StringRef::copy. No functionality change.