Fix ticket 21460

Now if you use cache template loader this will return the same template that if you does not use it.

Ticket in [django project](https://code.djangoproject.com/ticket/21460)