Causas consecutivas de serialização XML - Token StartElement no estado EndRootElement resultaria em um documento XML inválido

Estou escrevendo no arquivo serialização XML do objeto, gerado porvalidator.MatchPossiblyValid(string input)método. A primeira chamada, serializa e grava no arquivo. No entanto, a segunda chamada falha com uma exceção:System.InvalidOperationException: 'Token StartElement in state EndRootElement would result in an invalid XML document. Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment. '

XmlSerializerNamespaces emptyNS = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty });
var serializer = new XmlSerializer(typeof(PDPCustomerInfoInvalid));
var settings = new XmlWriterSettings();
settings.OmitXmlDeclaration = true;
//settings.Indent = true;
using (var stream = new System.IO.StreamWriter(args[1], true))
{
    using (var writer = XmlWriter.Create(stream, settings))
        {

                serializer.Serialize(writer, validator.MatchPossiblyValid("STRING FOR PARSING"), emptyNS);
                stream.Write(Environment.NewLine);
                stream.Flush();
                //Line below throws the exception
                serializer.Serialize(writer, validator.MatchPossiblyValid("STRING FOR PARSING"), emptyNS);
                stream.Write(Environment.NewLine);
                stream.Flush();

        }
}

questionAnswers(1)

yourAnswerToTheQuestion