When you remove a layer and set transitive edges to TRUE you often get an error that the edge you are trying to create already exists which stops the whole function from running.
The alternative is
Error in Ops.data.frame(df[j, ], common[i, ]) : ‘==’ only defined for equally-sized data frames
which doesn't seem to be mully based but instead more fundamental