Fix --ignore-modules with --include-dependencies active.
A test case will follow but would clutter the actual fix (which is
ensuring that a pass to remove all ignored modules happens immediately
prior to forming the final module list).
BUG:394497
FIXED-IN:18.08