Remove useless use of undocumented submodules.
Remove useless use of optionSet.
Add error an message to prevent use of useless submodules.
Merge pull request #3864 from nbp/useless-submodules

Remove useless use of undocumented submodules.