fix: move auto-installation logic of optional modules to hook_modules_installed

Closes #3487276

Merge request reports

Loading