OK, I have figured it out! OE (output enable) is pin 9 (marked G) on the TPIC6B595. So I disconnected the OE pins of the shift registers from the GND (that's how it originally was) and connected them in chain and to the Arduino pin 49. I left SS on Arduino pin 53, as it was before. And I started using this code:
PORTL |= B00000001; //Output enable (pin 49) disabled
SPI.transfer (cathodeData1);
SPI.transfer (cathodeData2);
SPI.transfer (anodeData);
PORTB &= B11111110; //Latch (pin 53) low - start transfering data
PORTB |= B00000001; //Latch (pin 53) high - done transfering data
PORTL &= B11111110; //Output enable (pin 49) enabled
Unfortunately this doesn't change anything The ghosting remains. During multiplexing the ghosting is seen as the previous plane being lit up very lightly at the same time when the new layer is lit up at full brightness.