Adding an environment texture to the background causes a SHADER_EVAL_BACKGROUND launch. The OptiX implementation only creates the pipeline for that launch when kernels were loaded with the "use_background_light" feature and that feature is only set if the background light is enabled. But during synchronization with Cycles the "is_enabled" flag is never updated again after it was initially set. It is set to "false" via "LightManager::disable_ineffective_light" while no background texture node existed, but never set to "true" again after one was added. As such kernels were not reloaded with the required feature and the launch failed.
This change sets the "is_enabled" flag back to its default value of "true" when lights are synced. It is then later updated in "LightManager::disable_ineffective_light" if necessary as before. But now it retains the correct value after a background node was added to the scene.