There's a little copy-pasto in gist_check_page_keys():
> + for (o = FirstOffsetNumber; o <= parent_maxoff; o = OffsetNumberNext(i))
Should be "OffsetNumberNext(o)".
I tested this patch with your testing patch from the other thread (after fixing the above), to leave behind incompletely split pages . It seems that the amcheck code doesn't expect incomplete splits:
postgres=# SELECT gist_index_parent_check('x_c_idx'); ERROR: index "x_c_idx" has inconsistent records