Will be reusing this in a following diff, so figured I should factor it out now.
Depends on D12759
Make sure it compiles
Rebase, move it earlier in the stack