Fix #2515: use $set key in _castUpdate