Handle deleted and modified nodes first before the added nodes