Index: libcfa/src/containers/string_res.cfa
===================================================================
--- libcfa/src/containers/string_res.cfa	(revision fe18b46d7a80d743842002e3565a3f0e9fc6a0a4)
+++ libcfa/src/containers/string_res.cfa	(revision 0ca15b74a1af1d7ecea0babdf66b02787cff7715)
@@ -405,6 +405,6 @@
 
     verify( shareEditSetEndPeer->Handle.s >= shareEditSetStartPeer->Handle.s );
-    size_t editSetLength = shareEditSetEndPeer->Handle.s + shareEditSetEndPeer->Handle.lnth - shareEditSetStartPeer->Handle.s;
-    verify( editSetLength >= this.Handle.lnth );
+    size_t origEditSetLength = shareEditSetEndPeer->Handle.s + shareEditSetEndPeer->Handle.lnth - shareEditSetStartPeer->Handle.s;
+    verify( origEditSetLength >= this.Handle.lnth );
 
     if ( this.shareEditSet_owns_ulink ) {                 // assigning to private context
@@ -418,5 +418,5 @@
         if ( char * oldBytes = VbyteTryAdjustLast( *this.Handle.ulink, delta ) ) {
             // growing: copy from old to new
-            char * dest = VbyteAlloc( *this.Handle.ulink, editSetLength );
+            char * dest = VbyteAlloc( *this.Handle.ulink, origEditSetLength + delta );
             char *destCursor = dest;  memcpy(destCursor, prefixStartOrig, prefixLen);
             destCursor += prefixLen;  memcpy(destCursor, buffer         , bsize    );
@@ -424,5 +424,5 @@
             assignEditSet(this, shareEditSetStartPeer, shareEditSetEndPeer, 
                 dest,
-                editSetLength,
+                origEditSetLength + delta,
                 0p, bsize);
             free( oldBytes );
@@ -434,10 +434,10 @@
             assignEditSet(this, shareEditSetStartPeer, shareEditSetEndPeer, 
                 shareEditSetStartPeer->Handle.s,
-                editSetLength,
+                origEditSetLength + delta,
                 0p, bsize);
         }
 
     } else if (                                           // assigning to shared context
-        this.Handle.lnth == editSetLength &&              // overwriting entire run of SES
+        this.Handle.lnth == origEditSetLength &&          // overwriting entire run of SES
         & valSrc &&                                       // sourcing from a managed string
         valSrc.Handle.ulink == this.Handle.ulink  ) {     // sourcing from same heap
