Fix defects when inserting largest possible keys.