In an unmanaged language, a bug can surface in an unrelated area so simply re-writing the "affected" code can change the behaviour without addressing the underlying issue.
indeed. whenever i find a bug of that type it expands from "fix first_alive_BM() in <whatever routine>" to "fix first_alive_BM() everywhere its used." and that is on the todo list. but i suspect it was the calling code, as first_alive_BM() is used in quite a few places, and has yet to blow up anywhere else. i think that trying to find and fix all similar types of bugs whenever i find any bug helps keep the bug count down. no dangling threads, so to speak.