Fix a logic error in the openstack security_group code.

While turning the loop inside out, a bug was introduced that would
only include the last security group `X` times rather than including
all `X` security groups.