A General Mechanism for Network-Dosage Compensation in Gene Networks