Correctly dump big serial primary keys (4-1-stable)

Backport of #15973 for 4.1