Fix possible race condition.
!updated now gets only evaluated if !is_dynamic() returns false, that is, if no
thread is running(and thus no race condition can occur).