Group ids in profile fields are not correct
Overview
When adding the groups field onto the profiles the id that is used as part of the adding of the fields is not correct causing potential for DB errors
Reproduction steps
- Navigate to Profiles -> supporter profile fields
- Go to fill in the supporter profile and select the Advisory Board
- Find that the contact is not added to the group
Current behaviour
The field ids are in sequential order rather than the group id
Expected behaviour
The group id should be used in the fields
This seems to have regressed from this change https://github.com/civicrm/civicrm-core/commit/78d0090bf8b4b909564b806e40d4b3dd78720572#diff-c113d6099b62e0ddbf3876a74fbf756f7743590dd27397dec4ebf9b24dfca578R1126