Fix Timed thread-safety. Fixes #12069