refactor pool_calc_duchanges a bit

No functual changes.