Fix loading of custom types defined in external modules.
Merge pull request #91 from sunetos/types_fix

Fix loading of custom types defined in external modules.