Fixes #5667: correct the compliance computation logic for aggregates

are you sure you want to comment that ?