The change in outliner and viewport visibility (897e047374fa) was made
assuming the bases of the render and viewport depsgraph were
independent. Thus we were deliberately setting base visibility when
rendering:
/* When rendering, visibility is controlled by the enable/disable option. */
if (mode == DAG_EVAL_RENDER) {
base->flag |= BASE_VISIBLE;
}However, we were syncing data back to the original depsgraph, leading to
hidden viewport objects to re-appear.