Stronger effects of heterozygosity on survival in harsher environments