Consider removing global variables that store the discriminant IDs per variant as they are likely not really needed. See pull request #1397.