Most likely what has happened is you have a cracked cat causing a exhaust leak. That exhaust gas that leaks out is not being read by the O2 sensor and since that doesn't match what came through the mass air flow sensor the ECU starts to tune around that info. If it starts to go too far off the charts it'll think there's a sensor issue and throw codes for sensors that actually aren't faulty. Either way if I were replacing a cat I'd suggest new O2 sensors. If it were me I'd replace the mechanical failure first then retest the sensors.