Fix BaseSegmentVariant modifyChars method

	Could not remove text from a segment with a single TextAtom
	Could not insert text in the middle of a TextAtom