Avoid sorting if references are added to ref_cache in order