if (null == result) {
result = new RoleSet();
result.add(r);
for (final NF4 nf4 : ontologyNF4) {
if (r == nf4.getR()) {
result.addAll(getRoleClosure(nf4.getS()));
}
}
// We do this after the above recursive call to trigger a stack
// overflow in case there's a role-inclusion cycle
roleClosureCache.put(r, result);