Fixed #23947 -- Django's test suite doesn't pass in reverse order

Fixed inconsistent tests when running Django's test suite with --reverse option.
Please add a comment about why this test is isolated in its own class.