REF (string dtype): de-duplicate _str_map (2)
Follows #59443.

For the non-arrow version this is logic-neutral.  For the arrow version the addition of L377-379 is a small change.  It was introduced in #55736 for the non-arrow version and there is no indication the divergence was intentional.
Thanks @jbrockmendel 