Fix issue 12446 - std.parallelism.amap: prefer iteration to indexing

https://d.puremagic.com/issues/show_bug.cgi?id=12446