Copy metadata references before expanding them