I have an animated GIF that has about 60 frames, some of the frames are encoded in 'L' mode and others are in 'RGB' mode. Many actions, including a simple "seek" command" fail with a "ValueError: images do not match" exception when self.im.paste(frame_im, self.dispose_extent) is issued in GifImagePlugin.py. This happens when "self.im" and "frame_im" have different modes.
This might be a protection technique for not being able to process such files with Pillow.