Hi Paul, first, thanks for taking on this rather monumental task!
Given the scale of the overall patch, I am beginning to have a lot of sympathy with Thomas's suggestion that the finalization calls should be moved to the front end! I will take a quick look to see how easy this would be to implement.
There is one drawback if you do this in the front end: There are a few places where it is not possible to add code without running into ICEs later, like WHERE/ELSEWHERE, which is why fronend_passes.cc keeps track of these things. Best regards Thomas