[1.6.x] Fixed #22338 -- Fixed a test dependent on dictionary key iteration order.

Backport of 69a4f383f6 from master
[1.6.x] Corrected an import in a model form docs example.

422f5d9a2c from master.