I believe this is caused by an interaction between indirect buffers and after-change-functions. In the buffer with the error, whitespace--update-bob-eob is in after-change-functions even though whitespace-color-on (which is the only place that hook is registered) is never called on the buffer. whitespace-color-on sets up state that whitespace--update-bob-eob depends on, which is why the error occurs. I see no mention of after-change-functions in the documentation for indirect buffers, and no mention of indirect buffers in the documentation for after-change-functions. I'm not sure how they're supposed to interact, so I'm not sure if this is a bug in whitespace, indirect buffers, or even org. We could slap a bandaid on whitespace.el to work around this issue, but I'd rather fix this the right way. I'm not sure what the right way is; if someone who understands indirect buffers could give me some tips I'd appreciate it. bug#46982 might be related.