Restore lost id by using entry number of preceding, following pallet