Order by rank instead of selecting connections where rank=1 to ensure that findPrimaryConnection() doesn't return null if there are connections. SOCIAL-341