Speed optimization to Bayesian network InferenceQuery class.