Check if the context is valid only if it's replacing the current thread context