New way of detecting loops which is simpler for the merge of the parsers.