`BKE_modifier_copy_ex` did it (which is called e.g. when copying the whole stack from one object to another), but when simply duplicating a modifier (`modifier_copy`), it was just ensuring a unique name (based on the default name) without copyig the existing name prior. Pull Request: https://projects.blender.org/blender/blender/pulls/135172