[cg_list_neighbors] fixed mistake on periodic checks