MDL-63431 atto_media: Fix non-unique id issues and extend tests.