wtd.rank: fixed bug in no weights case (thanks: DPlat)