More robust module cloning