Small changes to foreach tests