Another rechunking algorithm

@mullenkamp also see this discussion for further context