I believe that this is the source of the problem Mongrel had experienced with the Mutex and a memory leak.
I've described a possible (single line) solution to this in the article. What I am not completely sure of is what the intended semantics of shift actually is, consequently the suggested fix may be inappropriate. I'll leave that to someone else to decide.
Kirk had mentioned something along these lines but this is the first explanation that also shows where in the C code it's busted.
Ok, but here's the problem, doesn't this also mean that the shifted array continually grows? It seems to me that shift basically makes Array act like an unbounded ring buffer.