Fix merging bug in multiput

The merge function used to be called whenever the new key already
existed in the index, even if it was hidden by the bitmask. This commit
first checks the bitmask before calling merge.