src: fix StringBytes::Write when input string is 'external' - Fix #7288