Fix switch test-chain stack leftovers. Fix iterator on null and undefined.