Fix a bug when generating predecessor autocomplete data