handling integer overflows
Fixed: accessing correct tape index

  Bug introduced in 5b33047702