Sort on location if declarationRank is the same.