What did you do?
I iterated through gif frames and added copies of the frames converted to rgba to a list of the following 4 frame gif 
This was the code I used and what produced the invalid result
frames = []
while True:
frames.append(im.copy().convert('RGBA'))
try:
im.seek(im.tell() + 1)
except EOFError:
break
What did you expect to happen?
Expected that all the frames would look normal without them merging
What actually happened?
The last 2 images merged
as in the following pic when the expected result would be 
The second last frame was kept normal but the last frame included the second last frame merged to it
I was able to get the desired result by using the following modification of my original loop
frames = []
while True:
frames.append(im.copy().convert('RGBA'))
try:
im.seek(im.tell() + 1)
except EOFError:
frames[-1] = im.copy().convert('RGBA')
break
What versions of Pillow and Python are you using?
Python 3.6.4
Pillow 5.1.0
What did you do?
I iterated through gif frames and added copies of the frames converted to rgba to a list of the following 4 frame gif
This was the code I used and what produced the invalid result
What did you expect to happen?
Expected that all the frames would look normal without them merging
What actually happened?
The last 2 images merged
as in the following pic when the expected result would be 
The second last frame was kept normal but the last frame included the second last frame merged to it
I was able to get the desired result by using the following modification of my original loop
What versions of Pillow and Python are you using?
Python 3.6.4
Pillow 5.1.0