validate_cursor() is called regularly, but only for the current window. When changing the buffer for a non-current window, we need to invoke it in the context of that window.
readonly