I think it now stumbles when the two patterns differ in length (16 and 32 ie)
And yes, when changing near the end of the pattern.