This was a long running bug with merc based muds. The logic was to scan the room items first which cased the bug. Later versions would scan corpses first, then self, then room.