Fix a bug in Deserializer related to packages

The Deserializer wasn't caching the modules with regard to their require.
Merge pull request #1094 from aadsm/bug-fixes

Looks good, thanks for the patch.