Allow nested data structures to be sorted.

Allow items to be sorted in nested data structures.