Added a check for cycles in b-hypertree init