public void endVisit(TypePolicy x) {
for (PolicyNode n : currentLocation()) {
if (!(n instanceof PolicyBlock)) {
continue;
}
PolicyBlock block = (PolicyBlock) n;
List<AllowBlock> toCopy = block.getAllows();
if (toCopy == null || toCopy.isEmpty()) {
continue;
}
List<AllowBlock> copied = new PolicyCloner().clone(toCopy);
x.getAllows().addAll(0, copied);