See individual commits for details. Supersedes !34 (closed).
https://phabricator.apertis.org/T10511
https://phabricator.apertis.org/T10512