Fixed #21760: prefetch_related uses an inefficient query to get the related fk data

Ticket [#21760](https://code.djangoproject.com/ticket/21760).