This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
If a new module is installed during running IDE in headless mode, the module is not stored in modules cache. It causes the issue 224078.
Turned out, this would not work anyway, as very likely the updater will install update NBMs after the IDE shuts down, so the know the proper initial state, restart is needed, right?