This ticket addresses top class level comment in JpaGroupRoleProvider regarding refactoring out the REST endpoint from the core JpaGroupRoleProvider service to clean the code and attempt to avoid a race-condition load collision.
"Since this is not intended to be production code, the REST concerns have not be factored into a separate class. Feel free to refactor." 
And the module load race condition SCR-vs-JAXRS tug of war exception .
 Load race condition with dependencies triggered by JaxRsServiceTracker.addingService regarding opencast-userdirectory. Consistently about the time the "/groups" endpoint is being registered.
Related to MH-11973, which throws the cycle on "matterhorn-textanalyzer-impl". The textanalyzer impl has a separate Endpoint class. However, the endpoint relies on DI of textanalyzer impl, the impl has a static dependency on userdirectory. Unbinding JpaGroupRoleProvider service from JAX-RS endpoint registration processing might help there, too.
Possibly related: https://issues.apache.org/jira/browse/FELIX-5887 "Cycles in DS depending on bundle order"
... Looks like the connection between all three problems I discovered, is a call to #getService(XY) while in Activation of XY. Iam not sure if the situation did not occur in 2.0.10 and earlier or if it didnt lead to an error back then.