Re #10390. Changed loops to parallel