We only set the grapheme segmenter's text once after creating a new segmenter, so we also need to clear it whenever we invalidate the text. (cherry picked from commit 25516e351e46104ff445216e7835aaab9f9b9535)