Where is the mistake?
It is asking the ground pins to take (sink) the current for a whole row or LEDs. So that while the current is limited through the LED it is not limited through the pin. Thus you are overloading the pins and damaging them. The current is limited to 10mA per LED and the maximum current you can have through a pin is 40mA, so if you have four LEDs on in a row you are fine but that is the maximum.
I think there is this problem because the gnd's aren't all LOW.
Only one pin must be LOW at a time.
It could be that you have blown one or more of these pins. Check to see they will sill sink current, do a flashing LED sketch, wire the LED's anode to +, cathode to a resistor and resistor to output pin. If the pin is fine it should flash.