This keeps the implementation of setdefault and setlistdefault consistent. Also it's marginally faster than looking up the value again.