I had this same problem. I was exporting around 10 gif banners for a campaign, but the glitch only affected a few.
I wish I had a more airtight solution, but I eventually fixed the problem for each of the effected banners by "jiggling the keys" a bit- that is to say restarting Ps, deleting the animation and starting again, and even deleting the entire PSD and starting from scratch. Was a real nuisance and set me back a good couple hours, but still got those gifs to stop looping.
Using Mac and Adobe CC.