This post was flagged by the community and is temporarily hidden.
WTH. I tried that approach first and only went to a duplicate item because that approach seemed to fail. But retrying it it works.
Ok, obviously PEBKAC.
(Attributes indeed aren't allowed on patterns, but they are allowed on match arms.)