fixed wrong template bug in libdai's tree_expectation_propagation