Check the dependencies when disabling modules

see #6576