foreach: fixed maybe uninitialized warning in test (-O2)