Safer nr_node_ids and nr_node_ids determination and initial values