Faster in nested loops than with flat_maps.