fix generation of large numbers of measurements.

Continues the previous commit to Work around lazyness vs loop/recur.