Properly realize-value in transact fn.