Fix linking nested modules