Skip duplicate imports, fixes #38
Skip caching of undefined
Correctly handle empty repeated message