That would be surprising as the altitude control should be independent from the compass. I'd also wager that more than just the compass is used to determine course. Most likely a sanity check in the control software will kick in and return control to the pilot, just as if the compass(es) broke for some reason during flight.