I just tried running that fixmigrant script in a savegame that was posted to the bug report thread, and it did not fix the problem - once I changed it to check/clear flags1.merchant instead of flags2.resident, it worked correctly.
I mentioned in one of the mantis things for one of those bugs (not sure if it was the main one or not) that I wasn't entirely sure if my problem was the exact same as others. As I mentioned there, my migrants are NOT listing as traders, they are listing as normal migrants that just never really join the fortress and keep the @ symbol.
The lua works for me as-is, so I'm starting to think that maybe it actually is another bug, maybe related, maybe not. But it certainly seems similar.
There are (at least) two different kinds of bugs:
#1 regular migrants who don't become proper part of your fort and stay on the map edge. This would be the case in the savegame Greiger posted. The problem seems to be that they have the resident flag set, clearing that helped.
#2 dwarf traders who don't leave the map. This happens quite often, and clearing the merchant flag does make them part of your fort. But I observed that they will run inside and start dropping all their clothes, which is followed by tantrums because they are naked.
Is there a compile with the zone plugin available for 34.07?
The zone plugin (zone, autonestbox, autobutcher) is still under development and could have bugs here and there. And there are some more features going to be added soon. For the time being, feel free to compile it yourself, but it's a bit too early to release it officially.