WiP: Make sure ensure_line_present replaces the whole line