Fixed bug in NamedRelationshipResource so that sorting is now possible for
nested relationship resources.