In my case it was a remote procedure call that was attempting to return xml. I converted to varchar(max) in the remote proc, and back to xml on the calling side.