My add-on requires Cycles to be enabled as I append some classes to existing Cycles types at registration.

I made a function to check if Cycles is enabled:

```
def cycles_check():
    import addon_utils
    is_enabled,is_loaded = addon_utils.check('cycles')
    if not is_loaded:
        print ('Cycles is required to use Photographer, enabling the add-on automatically.')
        success = addon_utils.enable('cycles')
        if success:
            print ('Cycles is now enabled.')
            return True
    else:
        return True

```

It "seems" to work: if Cycles is disabled when I enable my add-on, it enables it and my add-on can register properly. I can see Cycles in the render engine lists.

```
Cycles is required to use Photographer, enabling the add-on.
module changed on disk: 'C:\\Blender\\daily\\blender-2.92.0-6fb7d0f55927-windows64\\2.92\\scripts\\addons\\cycles\\__init__.py' reloading...
Cycles is now enabled.

```

But... Cycles is actually not properly enabled. The add-on in the preferences is not checked, and the Cycles Device property is missing, which breaks the UI but also crashes Blender if I start a render.

[![enter image description here](https://i.stack.imgur.com/uJ25g.png)](https://i.stack.imgur.com/uJ25g.png)

```
Traceback (most recent call last):
  File "c:\Blender\daily\blender-2.92.0-6fb7d0f55927-windows64\2.92\scripts\modules\bpy_types.py", line 808, in draw_ls
    func(self, context)
  File "c:\Blender\daily\blender-2.92.0-6fb7d0f55927-windows64\2.92\scripts\addons\cycles\ui.py", line 2217, in draw_device
    col.active = show_device_active(context)
  File "c:\Blender\daily\blender-2.92.0-6fb7d0f55927-windows64\2.92\scripts\addons\cycles\ui.py", line 114, in show_device_active
    return context.preferences.addons[__package__].preferences.has_active_device()

```