[DROOLS-601] fix queries when used in combination with agenda-groups