bug fix TreeSet for Rules: does not add all neccessary rules