BUGFIX: fixed SEGFAULT caused by bounds violations in routine grid_GetGridColRowNum