No ideas how to make such comparison, that would really help to pin point the bug?
Here I made another run with few steps on the output to see more what is going on and accidentally noticed this on one frame ("before" bug was different and much severe):
Proper:
Bug:
Here it didn't influenced much the end result (left/bottom), but how in the hell top/right corner mask is red, feathered and "12" visible when it goes through Greyscale.Levels(127,1,128,0,255)...