Check that foreach counts counts from $left to $right. This means it should count up if $left is less than $right and count down otherwise. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>