Fix false positive when checking a target attribute.