Swap between component instances in a file