Fix metadata comparison. Handle rename/delete combinations.