Improve upstream support for a backwards-compatible fork

These changes will reduce the number of merge conflicts a backwards-compatible fork might need to deal with in future.