Fixes broken "Add" functionality of replace_or_add
Introducing delete_lines