race_condition fix in invalidate_from_dict