[1.6.x] Corrected a usage example of `related_query_name`.

Thanks to Petr Glotov for spotting this.

Backport of 05a8cef428 from master
[1.6.x] Fixed #23370 -- defer() + select_related() crashed with inherited models.

Backport of 6613ea6e3f from master