[BACKLOG-328] [MONDRIAN-2049] Adding tests and fixing an issue when agg tables are turned on.