Use locked_sstream. Replace once parse_stream with parse_memory.