Fixed logic error with reindex methods for lists and sets.