Fix bug #62759: Buggy grapheme_substr() on edge case