I would avoid code duplication wherever possible. This doesn't need to hold up merging this change, but I'd prefer adding a variable instead:
```
$groupkey = (is_array($grp[$this->getConf('groupkey')][0])) ? $grp[$this->getConf('groupkey')][0] : $grp[$this->getConf('groupkey')];
```
And use `$groupkey` in the original two lines instead.