I can confirm that this happens though only with pigs and chickens in my case. It seems to occur whenever the chunks are loaded because a similar phenomenon occurs when traveling around and coming back. Also, looking at the reports that this "duplicates", I have to say that this appears to be a similar problem.
As for the cause, I think it is due to animals butting up against cobblestone walls and wooden fences. When they're reloaded either at the start of the game session or being back in the area, the animals appear on the other side of the fence since animals right against fences appear to be inside them. The game mistakes the animals for being outside when they were inside.
Not exactly Anthony. The differences are that this world was generated for the version it's in, and that there's no way to fix it for me, they just go back to the wrong lightning once the chunks are reloaded.