Fix and test sorting of PooledDataArrays with unsorted pool

This can be done more efficiently, but working is better than not
working.