[Bug 57824] SetThreadPriority unexpectedly fails on terminated threads instead of no-op