No, no, I didn't say N, I said two.
If you're holding one key, you have 1 bit set on each bank. If you press a second key, you now have an additional row bit and/or an additional column bit. You can tell what the new key is unambiguously. If it's still one bit on an axis then that bit is correct. If it's two bits then the new bit is correct.
You only get problems when you have three keys held at the same time, or if multiple keys change state simultaneously.