Changes to make ProductDistribution work with mean field and SVI