Fixes #5667: correct the compliance computation logic for aggregates
Merge pull request #644 from fanf/ust_5293/5296/5667_bug_in_compliance_computation_logic

Fixes #5667: correct the compliance computation logic for aggregates