Fixed an error in loft() resulting from bad linemerge