Test case (v4) for last glitch I can think of and a fix for it.