cycles: fixing bug that removed keys and data from graph, breaking cycles_basis_matrix.