pcre2_config does a static check (defined at compile time) and therefore is unlikely to fail and might be even under the right circumstances optimized out.
you are correct that setting the original value was meant to protect from that function failing and will ensure the original path was still being taken (which I thought was safer), while your suggested change will take the opposite one (not setting UTF in a multibyte locale, which will fail in different ways). either way, IMHO, considering that most PCRE libraries have utf enabled (the default) the original code was the less likely to introduce any changing behaviour or even code changes (because of the expected optimization), but agree might have been too clever without a corresponding explanation. Carlo