Every time I accidentally stumble into that message, I check on the Postgres code, see how hard it is to fix the message and bail out.
https://github.com/postgres/postgres/blob/d2f24df19b7a42a094...
<https://github.com/search?q=repo%3Apostgres%2Fpostgres+%22ma...>
I agree code change is simple, but I guess the task is complex for other reasons