genotypeGivenAlleleFreqsFactor implementation updated to correctly handle the general case.