Longterm fix for adding </doc> to the end of results streams.