Tamed dogs don't attack horses. When a horse is hit the dogs will follow it, growling, and attempt to damage the animal. But the "attacks" have no effect on the horse.
Tame a dog and then hit a horse, the dog will not be able it attack it like it does when fighting other animals you hit. The dog wasn't sitting and a re-log/restart didnt fix the issue.
My Java is up-to date and I am not using mods.
(In the images the dogs try fight the horse but the horse isn't effected.)