The XOR checks in flow.tcl and precheck are entirely different.
In flow.tcl the XOR check verifies that the gds output by magic matches the gds output by klayout.
In precheck, the XOR check verifies that the caravel/caravan connections have not been modified when compared to the golden layout.