implement independent parts of #24024
@TomAugspurger just for kicks I went through to see how much of #24024 could be implemented without actually changing anything.  Could've squeezed out a little bit more; as-is only about 6% by line-count.  If it's not worth the rebasing hassle, I'll close.