reintroducing the oldType vs newType guard in _commitVal: prevents bugs with parentNode getting dereferenced