I'm not sure why you use ``setdefault`` here. If there is a top frame, but it is empty, you will change its empty values, but in every other case it won't do anything. Or are you just using ``setdefault`` without caring that it does set a default value?