Replace a redundant mh_replace with patched mh_put.

In search for a bug in the hash index,
cleanup its code: replace a redundant mh_replace
with improved mh_put.