Fix #16165, fix the mods path in the shim and pass mods into wfuncs
Merge pull request #16170 from thatch45/16165

Fix the mods path in the shim and pass mods into wfuncs