[Bug 854679] bash does not properly handle value assignment in scripts if variable is assigned new value in a while loop