Replace indexing in flags gen with map2 function.
Replace indexing in flags gen with map2 function.

Overall helper function complexity was O(n^2) and now it is O(n).

fscheck/FsCheck,fsharp/FsCheck,fscheck/FsCheck