index: handle the "middle" unwrapping case