Crash in ToLowercase()

Please see: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9375