Need to make sure that functions work as expected in cases when a nodemap has separate connected components. Add a corresponding test.