Better DOM diff heuristic