Added an automatic generator for the CaseLinkTree rule. Fixed a bug
involving bounds checking for CaseLinkTree.