Glad you found the issue! The outdoor temperature may have been just a coincidence or those swapped sensors might have sent a signal that was within range during those temperatures. Maybe replace the wiring harness too.
Some unsolicited advice/info for those that may be curious: sensor "out of range" codes typically are sensor failure or wiring failures.
Sensors have a signal range that align with a measurement reading. Signal could be 0.5-5V, 4-20mA, 0-1kohms etc, etc. Your ECU knows that a working sensor physically can't report values below or above that range, so if receives a signal below or above the sensor's max range, it lights up the CEL saying "I'm getting signals that I shouldn't be" or "I'm not getting a signal".
It also looks at other sensors to double check if a sensor is reading close to what it expects. For example: you're wide open throttle, the car is reading lots of air flow, your other MAP sensor is reporting boost, but your ECU is reading vacuum from that TMAP sensor. You're car will light up the CEL saying "hey man, at 100% open throttle, with lots of air flow, my other pressure sensor says 25psi, that vacuum reading is physically impossible".
I suspect the second part was happening here as the sensors were mixed up, perhaps they were sending signals that the ECU thought was okay at the time by coincidence