Heterogeneous selection promotes maintenance of polymorphism in host–parasite interactions