Equipping a pumpkin or a mob head by using a dispenser plays and shows subtitle "Dispenser failed". This seems to happen most of the time, but not always.
This might happen because of the intended behavior of these items not being able to drop from dispensers.*
If nothing can be spawned and nobody stands in front of the dispenser, the item will not be dropped into the world. This is an intended behavior.