                           visitedVertices: [Int], // need order for subcycle
                           visitedEdges: [DIEdge]) {
     if currentVertexIndex == startVertexIndex && !visitedVertices.isEmpty {
-      assert(visitedVertices.count == visitedEdges.count)
-
-      result.insert(Cycle(vertexIndices: visitedVertices, edges: visitedEdges))
+      result.append(Cycle(vertexIndices: visitedVertices, edges: visitedEdges))
       return
     }
 

  private func findAllReachableIndices(for startVertexIndex: Int) -> Set<Int> {
    var visited: Set<Int> = []
    var stack: [Int] = [startVertexIndex]
    while let fromIndex = stack.first {
      stack.removeFirst()

      visited.insert(fromIndex)
      for toIndex in graph.adjacencyList[fromIndex].flatMap({ $0.toIndices }) {
        if !visited.contains(toIndex) {
          stack.append(toIndex)
        }
      }
    }

    return successful
  }

  private func checkGraphCyclesEdges(cycles: [Cycle]) -> Bool {
    var successful: Bool = true
    for cycle in cycles {
      assert(cycle.edges.count >= 1)
