Fix cloning aggregate enity queries.

Closes #3593233

Merge request reports

Loading