Functional buffering via cell-specific gene expression promotes tissue homeostasis and cancer robustness