The method ShoppingCartService.GetUnitPriceAsync has the "bool includeDiscounts" argument.
At some point it calls the method PriceCalculationService.GetProductAttributeValuePriceAdjustmentAsync which calls GetFinalPriceAsync without specifying a value for the argument includeDiscounts, which defaults to true.
So even if I call ShoppingCartService.GetUnitPriceAsync with includeDiscounts: false, that PriceCalculationService.GetFinalPriceAsync call is made with includeDiscounts: true.
In addition to produce a wrong result (if I set includeDiscounts = false, I assume that discounts will not be applied to product attributes too), this makes impossible to develop discount rules based on cart items amount (at least without rewriting several methods of ShoppingCartService and PriceCalculationService), since it could lead to infinite recursion when checking the requirements.
The method PriceCalculationService.GetProductAttributeValuePriceAdjustmentAsync should have "includeDiscounts" argument (which defaults to true), so it can pass it to GetFinalPriceAsync.