Pull out compare_GridNodes for portability