actually this check is to remove rule duplication and actually '7' (assumption that rule duplication has very small probability if rule has length more than 7) is to make the code slightly faster (we can look through all elements in rule and check it by hash-code. But it's OK, I will change the code to look over all elements if this is not good).