break instead of continue if depth > lmin + 1: The set is sorted by
depth, so the rest of the elements can also be skipped.