Sort page_sets using key.