Floor closest_unmasked_index values

Caused problems with low frequency and high offset parameters.