0001445: deadlock when obs_frontend_set_current_scene is called from the video_tick method of a source

Description

Set studio mode on and make sure duplicate scene is switched on.

In a source I want to call obs_frontend_set_current_scene to switch scene after playback ends.
But video_tick is called from tick_sources which locks obs->data.sources_mutex. Then by calling obs_frontend_set_current_scene the same mutex is locked (which causes the deadlock) via this path:
obs_frontend_set_current_scene -> OBSBasic::TransitionToScene -> obs_scene_duplicate -> create_private_id -> obs_source_create_private -> obs_source_create_internal -> obs_source_init -> obs_context_data_insert