fix Issue 12009 - local import and "unable to resolve forward reference" error

`Module::semantic2` could be invoked from local imports, even when some
local symbol semantics are not yet completed.
Merge pull request #3418 from 9rnsr/fix12009

Issue 12009 - local import and "unable to resolve forward reference" error