a slightly optimized encoding of transitive roles.