Fixed bug in module inferencing in load_dyn, catching an inconsistency
due to bad ordering of declaration and use.
Authored by: dwarren 2017-03-18
Parent: [r8989]
Child: [r8991]