generated: Switch resolution module back to what it was before (#57419)
This addresses post-commit review
https://github.com/JuliaLang/julia/pull/57230#discussion_r1939750418.
This change was left-over from before I decided to also change the type
of the `source` argument (at which point `source.module` was unavailable
in the function). This module was supposed to be the same, but it turns
out that both the julia tests and several packages use this code
manually and use different modules for the two places. Use the same one
we used before (which is probably more correct anyway) to fix #57417