Critically, this fixes ninja dist for me.
ninja dist
Closes #1447 (closed)
This will create a new commit in order to revert the existing changes.