Fixes rare issue with clearing of _value_cache

Deals with interesting issue with _value_cache where values cached in-between an "insert_timesteps" and a "get_values" could return incorrect results.