fixing the problem when retrieving values in ArrayHashMap using the
method get(Object) can cause ArrayIndexOutOfBoundsException when the map
is being modified (previous code to avoid this did not work)