Added more support for flagging items that have changed during migration