Fix small bug in build_adjacency_lists().