patch 8.2.5014: byte offsets are wrong when using text properties

Problem:    Byte offsets are wrong when using text properties.
Solution:   Make sure text properties do not affect the byte counts.
            (Paul Ollis, closes #10474)
diff --git a/src/memline.c b/src/memline.c
index 83344bc..83aa2c6 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -4004,6 +4004,8 @@
 	    {
 #if defined(FEAT_BYTEOFF) && defined(FEAT_PROP_POPUP)
 		int old_prop_len = 0;
+		if (buf->b_has_textprop)
+		    old_prop_len = old_len - (int)STRLEN(old_line) - 1;
 #endif
 		// if the length changes and there are following lines
 		count = buf->b_ml.ml_locked_high - buf->b_ml.ml_locked_low + 1;
@@ -4023,10 +4025,6 @@
 		// adjust free space
 		dp->db_free -= extra;
 		dp->db_txt_start -= extra;
-#if defined(FEAT_BYTEOFF) && defined(FEAT_PROP_POPUP)
-		if (buf->b_has_textprop)
-		    old_prop_len = old_len - (int)STRLEN(new_line) - 1;
-#endif
 
 		// copy new line into the data block
 		mch_memmove(old_line - extra, new_line, (size_t)new_len);