Add guards against non_existant line replacing (occurs with those tricky multi line edits)