Problem in dynamicCache: index -1 is out of bounds for dimension 0 with size 0 in cache_position[-1]

It seems to also happen with StaticCache(). It’s similar to the following issue…