fold _d_rehash() and __d_rehash() together