What I expected to happen was for the horse/donkey to just get pushed away from the block. What actually happened was the horse was pushed inside the block, therefore it suffocated and died.
Steps to Reproduce:
1. Spawn a couple of horses near some blocks.
2. Then gradually, the horses will walk towards the blocks
3. Then, (usually small horses) they are pushed into the wall by other horses and are suffocated.