I also discovered today that this can be caused by the stack needing to be rolled back. I was debugging with rollback disabled. But eventually it started producing this error, and rolling the stack back resolved it