How to reproduce:
1. Create two identical armor pieces which use the attribute system
2. Wear one armor
3. You'll notice that the attribute has been applied. In the pictures, it is speed.
4. Hold the identical armor in your hand.
5. Move your hotbar selector away from the armor
6. You'll see that you'll lose your attribute, even though you are still wearing the armor piece.
This also happens when you die and keepInventory = true
Edit: This is fixed in Minecraft 1.6.1