ResourcePool: Fix deficit counting.