The parent cache tries to reset the child cache’s state by iterating through the cursor. This doesn’t work since the cursor may have already been partially iterated. When we start again at Begin() it may double decrement m_dirty_count. Fix this by throwing the error and letting the child cache catch it and reset its own state properly.
Fixes #34645