Fix #7288 - misplaced input string length in StringBytes::Write when input string is 'external'