Just checked again now. The tag defaults to reference the first imagery layer you had open. It doesn't matter if you change it.

I'll create an issue to see whether this is something people want addressed.