Type fix for grid_t::copy_to_int.