Fixed errors in generate_indices.

Idiot! Tried to modify dict while iterating and tested
someset <= min_links_in rather than
len(someset) <= min_links_in