Short description of error
Right some parts of Blender follow the workspace render layer, while others follow the scene active render layer.
Detailed description of error
We should create depsgraph based on per-scene_layer basis, meaning, we should replace build_scene with build_scene_layer. But it's not trivial for until we change ownership of depsgraph to be per-scene_layer (with some workspace or window involved into the key) or something like this.