Minor dInventory optimization

Calling inventory.getHolder() can sometimes be expensive... So try not
to do it more times than necessary