Fixing group id identification assignment. Under multiple creation/destruction of port-groups rounds, the value of size() is not a good indicator of the position in the vector