MAINT: untested speedup of get_node_to_distn