The second aggregation is not valid. Please provide the actual code that you are testing.