Assign IPs from networks in each node's group

Previously nodes were assigned incorrect IPs if nodes from
more than one node group were being assigned IPs. All nodes would
be assigned IPs from the last network group processed irrespective
of the node's actual group.

Change-Id: I3d170d23bf3402d88161adb264240b85ebc7bdd4
Closes-bug: #1389160
Merge "Assign IPs from networks in each node's group"