Fixed up some range fors which VS2010 can't do.