Progress towards #17957
Previously part of !7498 (merged), need to address review comments on that in this.