 This issue can easily be avoided by comparing forward voltages of the LEDs used in the matrix and checking for compatibility issues.Or, more simply, using LEDs that all have the same forward voltage.This is also a problem where the LEDs are using individual resistors instead of shared resistors, if there is a path through two LEDs that has less LED drop than the supply voltage these LEDs may also illuminate at unintended times.