[1.5.x] Fixed #20545 - Made class-based view MRO lists consistent.

Thanks wim@ for the suggestion.

Backport of c36b75c814 from master