Remove a use-after-free when parsing SOAP response