Correctly pick up modules with imports