I just created a pull request that solves the problem. However, it uses a different solution than prescribed in the description.
It passes --group-add for all groups the Jenkins user belongs to. The original suggested solution would only work if there was a shared /etc/group between Jenkins and host.