Sort objects which are descendants of arrays

Currently, the sort option causes only objects which are not descendants of arrays to be sorted.  I contend it would be more useful to sort all objects, rather than only objects which are not descendants of arrays.  This pull request implements that change.  I look forward to your thoughts.