Added guards for stable iterators