[MONDRIAN-1572] fixed null pointer issue related to agg tables and many to many