Fix bug where flat edges get zero weight during x positioning.