Fix indecies in POLocalRearrange and POPartitionRearrange