Get rid of the old NT4 domain or purge SIDHistory. I am willing to bet neither is an option for you. Throughout our NT$ to AD migration, the 'from' domain group objects only co-exist with the 'to' domain migrated group objects with SIDHistory for one or two days so it has never been much of a problem.

I think Howard Bullock has more experience with lingering SIDHistory so I will try and send out the bat signal.

You may have to revert some portions of your script to 3.63 which does not use group cache. If that is not possible, you might have to setup an INI file to emulate what InGroup() does. Not good news, I'm afraid.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.