Bug 10723: make SearchOrders() take into account the pending parameter