Do not silently dismiss unapplied document changes when adding module

Part of #9356
Do not warn about changed modules when changing modules.

Part of #9356
Also fixes #9365