[GEOT-4863] WeakValueHashMap can throw an ArrayIndexOutOfBoundException on put