Imported better matching strategy from ChangeDistiller (untested)