Fix DH_get_nid() so that it does not cache values.