Replace costly Hash#fetch with arity=2 with arity=1 + block.