While debugging some gifs that even Paint Shop Pro fails to render (but Windows, Firefox and Microsoft GIF Animator do read correctly) I found all of them had no clear code as the first code in each frame.
Removing line 202 fixed it.
bits.read(); // Skip leading clear code
However this breaks all other GIFs because now their clear code is interpreted as a color code. Need to investigate.