The one line change that actually fixes it is
Serial.cpp line 162, where the SD state is compared
to “not busy” instead of “is idle”, thus also handling
the “not present” case.
In the process, I converted the “const int SDCARD_ …”
to an SDState enum class, thus proving type safety and
eliminating yet another untyped uint8_t .