Fix a media regression in [24110] that could cause duplicate models.

Props garyc40. Fixes #24753. See #24094, #23830.

git-svn-id: https://core.svn.wordpress.org/trunk@24771 1a063a9b-81f0-0310-95a4-ce76da25c4cd