To open a dialog, you need context information, in particular to decide in which window the dialog should be displayed. This is done with the help of the LayoutComponent API getDialogSupport. Only the WindowComponent and the MainLayout set the DialogSupport directly. Otherwise, the component hierarchy is traversed until the first parent with a DialogSupport is found.
In ticket #24085 this was changed by directly asking the MainLayout of the corresponding component for its DialogSupport. This is wrong, because especially external windows usually need the DialogSupport of the WindowComponent.
Concretely, the dialog for selecting a script for the ScriptingRecorder is displayed in the main window instead of in the ScriptingRecorder's window.
Conversion
LayoutComponent gets the variable _window, which contains the comprehensive WindowComponent or just the MainLayout. If the parent of a component is set, _window is also updated using the new parent.
Test
Start the TL demo, open the ScriptingRecorder and open the dialog to load a script. This dialog should be displayed in the ScriptingRecorder window and not in the main window.