[html] Don't get confused when grouping distance is zero

Previously zooming in too far with too low of a gMaxPoints value would
cause grouping distance to be zero, resulting in groupin() always
returning NaN