[1.6.x] Fixed #16895 -- Warned about cost of QuerySet ordering

Thanks outofculture at gmail.com for the suggestion.

Backport of cbf08c6b0c from master