Now ready for review. Still needs documentation/notes.
Aimed at fixing #17656.
@rae will be interested