Haven't seen that happening vh, but read on the wiki that foals could glitch into blocks horizontally and die. I guess the safest place to keep horses in that case would be a leaf/glass buildign etc. where they don't suffocate in the blocks (if they don't do that in transparent blocks).