Issue #2017801 by fredcy, Ralf: Allows to use aggregation.