Fix issue #11216 - Replace std::hashmap::{each_key, each_value} with iterators