Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 2bc34c5..cf4f842 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -679,6 +679,11 @@
     }
     new_size = (struct_size + (length + 1) * char_size);
 
+    if (_PyUnicode_HAS_UTF8_MEMORY(unicode)) {
+        PyObject_DEL(_PyUnicode_UTF8(unicode));
+        _PyUnicode_UTF8(unicode) = NULL;
+        _PyUnicode_UTF8_LENGTH(unicode) = 0;
+    }
     _Py_DEC_REFTOTAL;
     _Py_ForgetReference(unicode);