For testing scenarios you should perhaps set the LsaLookupCacheMaxSize
to 0. See KB946358 for a similar issue to yours (and the solution):
The LsaLookupCacheMaxSize registry entry sets the maximum number of cached mappings that can be saved in the local SID cache. The default maximum number is 128. When the LsaLookupCacheMaxSize registry entry is set to 0, the local SID cache is disabled.
The behavior is by design.
I suspect your test resolves the wrong SID on subsequent runs, after the account is recycled in the AD.