The description:
(string-append (substring/cursors s1 0 start1)
(substring/cursors s2 start2 end2)
(substring/cursors s1 end1 (string-length s1)))
mixes cursors and indexes. It should be:
(string-append (substring/cursors s1 (string-cursor-start s1) start1)
(substring/cursors s2 start2 end2)
(substring/cursors s1 end1 (string-cursor-end s1 s1)))
--
Alex