When command blocks are updated by redstone wire, they don't seem to turn on in the correct order. This doesn't really affect simple impulse circuitry, but with repeating command blocks it seriously screws with the execution order. Just look into the code and make sure that once a command block is powered, it cannot be moved from that position in the execution order that tick.
Related issues
Comments


Marking as dupe of MC-11193 until you can provide more details showing this is a separate issue.
Probably MC-11193