Implement overwriting pathgrid records (Fixes #2175)