#1795 Use ArrayList to build collection of keys in removeAll, instead of HashSet
Merge pull request #1806 from kennymacleod/maintenance-3.x

#1795 Use ArrayList to build collection of keys in removeAll, instead of HashSet