The way everything is set up for it is different and sometimes you don't need to check all objects and other times you do but first you check local objects (in room, inventory, worn) and then the full list. The problem is that there is no real way to maintain how it is while actually making them all accessible at the same time.
Why not? It just requires that every bit of code which searches for a matching object run through a single API. I would think it's very rare that you'd want to search for far away matches before local ones, so checking the local lists first is probably the right thing to do.
So, establish a fixed ordering that you always scan with. For the sake of argument, I'll toss out "equipped, inventory, room, zone, global". Now, the user types "info 7.apple". If he's holding an apple, that's 1. If he's got on in his inventory, that's 2. We're not up to 7 yet, so scan the next layer out until you either find the 7th, or have scanned the highest level list that command/player has access to.
Of course, to do that, you have to be sure you keep track of the ones you find so they can be skipped over in the next list, but just remembering their addresses is probably good enough. If the player was an immortal, he'd scan all the way out, whereas a regular player would probably stop at the room level.
There are a couple of weird gotchas I suppose.... If I'm hoding an apple and type "get 1.apple", it may be counter-intuitive that it would say "You're already holding that!", but that just means you probably should have just said "get apple" instead.