WIP

Clean up the LayoutBasedDictionarySorter tests and get the dictionary
double changes out into a dedicated commit.