If an (for example "Leather Tunic") with the Attribute attackDamage,Operation:0,-1 is equipped, you cant deal Damage to Mobs.
But if you get a Sword with (for Example attackDamage,Operation:0,2 you hurt the Mobs with Atk Damage 2.
Now. If you deselect the Sword with attackDamage,Operation:0,2 you deal normal Damage to Mobs, and not 0.
Commands Used:
/give @p leather_chestplate 1 0 {AttributeModifiers:[{Operation:0,UUIDLeast:1,UUIDMost:1,Amount:-1,AttributeName:generic.attackDamage,Name:tunic}]}
/give @p iron_sword 1 0 {AttributeModifiers:[{Operation:0,UUIDLeast:1,UUIDMost:1,Amount:2,AttributeName:generic.attackDamage,Name:sword}]}
Linked issues
relates to 1
Comments 5

Confirmed for
14w31a
Minecraft 1.8-pre 2 now there is another bug: even with the sword you can't deal damage
relates to: MC-16345

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.
Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.

Confirmed for
1.8.3
... the affected version wasn't updated anyway

Probably invalid because of this:
The issue here is that you end up with duplicate modifier UUIDs on the player. One overrides the other, and we end up in a bad spot.
In the next snapshot you have
Slot: "mainhand"
(and other slots) on the modifier element. Please specify a different UUID for mainhand/offhand, and you should see the issue go away.
You used the same UUID twice. When using different UUIDs I cannot confirm this bug
please provide exact commands used