Here's one of the images used as an avatar. It is a 17-frame 8-colour GIF of a ball rotating, with a little glint/sparkle on the 16th frame.

The software encodes each image uploaded, and this is what comes out.

The issue isn't actually on the glint/sparkle frame. It's on the succeeding frame, the final one.
Does anyone know what would cause an issue like this?