add a function to fix trivial issues in the source tree

This was eventually fixed but with it broken a large number of revisions
are unable to be tested.