[TextSelection] Fix for failing unit tests.