The "name" of the wire is picked up based on what the source of the wire is. If that object is named, then the wire will have a name. Thus, you should look to the source of the wire for what you need.
Another option is to not use references but use variants. The openg Get data name will take any data dype wire in and extract the name of the wire, again this is the name of the source data.