Merging deletes a node that is within the tolerance of another node. You have to be very careful that there is not an element connecting these two nodes or you will get the error you did.  It is only helpful when there is no element between the two nodes.