mod_admin: fix replacing media items.

(cherry picked from commit c3951441f2ee6e0e55ebff4efac1153ccb9fddcc)