Vastly reduce DB lookups while adding changesets by pre-building ancestor hierarchies.