Replaced demanding distance in update.optmatch with check & warning based on hash (from digest.), and corresponding optmatch_same_distance and tests