Ok, I'm surprised that it works like that. But the problem might be that when you go to multiple channels and have a hyperstack within ImageJ, "Montage to Stack" will not work...
Anyhow, I attached a workflow avoiding ImageJ 1.x macros altogether. Maybe it helps for your project.
Have a nice weekend,
Jan