To debug this problem, I would wrap your code
$(this).up().remove()
in function:
function _debugRemoveInputLine(this) { debugger; $(this).up().remove(); }
This will let you know what $ (this) returns. If it really returns more than one object (multiple lines), then you definitely know where to look - in the code that creates the element using cloneNode. Do you make any modification to the resulting element (i.e., changing the id attribute)?
If I have a problem that you are describing, I would consider adding unique identifiers to the launch element and the string element.
source share