Fixed #22232 -- Prevented recursion error during circular template extension
Merged branch 'ticket_22232' of https://github.com/NathanRSmith/django into ticket_22232