[flang] Add missing module file hashes (#175636)
The compiler emits "!need$" lines to module files only for modules
needed by the module's outermost scope, but misses dependences on other
modules that might be USE'd in inner scopes.
Fixes https://github.com/llvm/llvm-project/issues/175611.