I'm making a new merge request with freshly merged main since I corrupted the last branch trying to do a rebase.
Tests can be found at #39535