If script currently evaluated by sh-to-mod sub-command or source-sh modulefile command relies itself on module to load some modulefiles, the environment variables intended for Modules internal use are reported.
Such environment variables (LOADEDMODULES, _LMFILES_ and __MODULES_*) should be filtered-out to get a consistent result not reporting/setting these internal variables.