private static ImmutableRoot getImmutableRoot(Root base, SecurityConfiguration acConfig) {
if (base instanceof ImmutableRoot) {
return (ImmutableRoot) base;
} else {
return new ImmutableRoot(base, new TreeTypeProviderImpl(acConfig.getContext()));
}
}