Changed semantic of for-each to execute 0 times on bad range rather than signal error
clean whitespace

Change-Id: I00e80af4fe91cd95bf23bee74b9c8614f2330f43