IndexOutOfRangeException.

lastCachedEngine is a zero based index in cachedEngines.