[core] Fix bug in load script that created the wrong annotations for Media