Ensure that mb_regex_encoding is always correct