Screen initialization is more context dependent than it used to be because of region polling, so the context needs to be set up correctly. Here was a case where the initialized window/screen passed to polling didn't match what's in context (UI context was unset in fact). Some asserts could be added to ensure data passed to screen initialization matches context, but can do that separately. Pull Request: https://projects.blender.org/blender/blender/pulls/135568