`constrain_update` is short enough that I don't think it makes sense to have it as a separate function from `constrain_updates`. Some of these arguments don't seem to be used anywhere.