Tidy up some convert_string_internal error cases, found by Andrew Bartlett.