This code no longer ICEs, and @yodaldevoid found that it was fixed by commit fe5710a. While that added a similar test, we can explicitly test this reproducer too. Closes #50582.
fe5710a