dict.c/dictRehash: check if rehash ends at last