'Aggregation over sliced queryset works correctly.'

def test_ticket12886(self):

    qs = Book.objects.all().order_by('-rating')[0:3]
    vals = qs.aggregate(average_top3_rating=Avg('rating'))['average_top3_rating']
    self.assertAlmostEqual(vals, 4.5, places=2)
