Fix sorting to work across sheets

Thought I lost the "keeping" flag, but it was actually a sorting problem.