[OPTIQ-427] Off-by-one issues in RemoveDistinctAggregateRule, AggregateFilterTransposeRule