[1.6.x] Fixed #23329 -- Allowed inherited and m2m fields to be referenced in the admin.

Thanks to Trac alias Markush2010 and ross for the detailed reports.

Backport of 3cbb759 from master
[1.6.x] Fixed #23375 -- Added missing security issues to the archive.

Backport of c9c0be3 from master