/replaceitem entity command makes block in entity's head with damage values "miss-texture".
Comments 4
I used /replaceitem entity @p slot.armor.head glass 1 5 and it placed an miss-texture glass on my head. It replaces other miss-texture block too if the block I want to replace has damage value.
You're setting the Damage value of the glass to 5. Glass does not have any other Damage value apart from 0.
Provide exact command used
Most likely a command mistake, should be a valid data value
Reminder, if an idem only has 1 shape only the data value 0 is used