fix the tests in GraphicalModels, which didn't manage to take into account the
randomness of hashcodes of symbols