When you use commands to give armor custom generic.armor values, you cannot wear two of them at the same time without incorrect armor values being displayed in the armor bar. The displayed number is based on which piece of custom armor was put on last. This is not only a visual glitch but the level of armor displayed is the one the game processes.
For Example. I give myself a chain mail helmet with a generic.armor value of 6 and leather boots with a generic.armor value of 5, when I put them on it either displays that I have 3 full bars of armor, or 2.5 bars of armor, even though there should be 5.5.
If you would like to recreate this do the following:
1. Type in /give @p chainmail_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.armor",Name:"Test",Amount:6,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"head"}]}
2. Then type in /give @p leather_helmet 1 0 {AttributeModifiers:[{AttributeName:"generic.armor",Name:"Test",Amount:5,Operation:0,UUIDLeast:1l,UUIDMost:1l,Slot:"feet"}]}
3. Go into survival or adventure mode and put on the armor, look at the armor bar.
4. Then get attacked by some mobs with the armor on, and compare the damage done to wearing full chain mail armor except for a leather helmet, the damage should be same, but it isn't.
Well, that for one doesn't work.
Different attributes need different UUIDs.