Yikes!!!
Yeah we should deal with these kind of issues automatically… PR here, should be merged soon.
https://github.com/discourse/discourse/pull/18040
Thanks for the thorough debugging here!