#2717: Fixed race condition in feature correlcation calculation by moving the error variable inside the parallel foreach.