Apply API crashes when applied to an empty hashmap or multimap.
Apply API crashes when applied to an empty hashmap or multimap.