This line would be invalidated by the code below that does:

```
method = oldMethod ?? method;
```

So if there was an previous registered method, the `oldMethod`, it would replace the new method.  But nowhere did it reapply the API group for the new method.  This left all methods with only the first API group set.