Detecting a Selected item thats named

i know how to do this normally, but for some reason when the item is named by a anvil it wont be detected. its only detected if its named by a command.

how does one get around this?

Continue to help post