Fix a bug when allocating the LSM cursor max_id array.