workaround for bug in intel compiler

Eliminated some firstprivate usage or make sure the loop is not run zero times.
Bug described at http://software.intel.com/en-us/forums/topic/476827