Blender crashes when enabling Use Nodes after the viewport compositor is
already enabled.
This happens because the active viewer key is not yet initialized for the
node tree at this point, which eventually leads to a nullptr.
This patch fixes that by returning the root context in case the active
viewer key is not yet initialized.