This change should fix the issue of multiple devices having the same name. It fixes cases where you need to drive multiple identical MIDI devices from the same PC with a DAW having everything routed automatically.
Fixes wireplumber#328 (closed) (Found later, first I fixed it after discovering it myself)
Probably the same should be done for PCM nodes as well, but those could be named by WirePlumber upon discovery. Due to the way MIDI devices are being discovered and instantiated, PipeWire is responsible for setting their names. Allowing WP to rename those will require some reworking of the way alsa-seq sub-backend works.