Fix importing of module files

Make module files correctly be scanned for imports

Change-Id: I3b1e5987d7d5f97cd4d569eb32f807e6bb89c58c
Fixes: bug 1235507