ensure that cached array is updated with instnaces

Previously, a cached array might be updated with a plain object, rather
than an instance of the class.
v1.4.1