handle an IndexError on rearrange_* more gracefully and present message to user