Thanks, this change looks fine to me. I do have a qualm in that coreutils (and I assume others) interpret !hard_locale (LC_COLLATE) as meaning that the locale is unibyte and uses native byte comparison. As I recall on some platforms (macOS maybe?), the C locale uses UTF-8 so this interpretation isn't correct.
This qualm is present both before and after the change, though. Perhaps the problem should be documented, but that could be the subject of a later patch.