Avoid calling `table.{insert,remove}` multiple times, as this causes multiple shifts in the `self.lines` table.