Why did you change this line:
int numRGBleds = numRegisters*8/3;
into this?
int numRGBleds = int(numRegisters*8/3)-1;
Adding the line driver circuit on my website might help with flickering, start with adding it to your clock line.
The arduino has some difficulty driving long signal lines at 4 MHz.
Do you have decoupling capacitors on your shift registers?
Edit: Could you try setting the number of shift registers to 5 and report what happens? This should tell you whether it is a software or hardware problem.