Consider florida, where if you are caught with shrooms that are wet, freshly picked, they cannot convict you for carrying contraband because you do not necessarily know what you picked.
Laws are often based on intent. In some cases, penalties vary depending on intent. It would be an unacceptably brutally harsh law to judge someone under a presumption of harmful intent for something they might have no awareness of.
QR codes can have icons on them. Certainly if I created such a t-shirt, I would put some cool looking icon in the center of it. Someone being dragged through the system might argue “i did not know that qr code was real… i just liked the cat in the middle of it”.
A smart attack would be coupled with a clear message. Have the malware clobber them with anti-evil messages and just like that you have a sound free speech defense.