Suppose the party is in a dungeon and is confronted with a door with two locks. They've already found one key, and want to find the other. If they were to just cast Locate Object to find "a key", it would just find the one were already holding and so wouldn't be particularly useful. (And they can't use the "specific object" mode of the spell as they haven't seen the key they're looking for before, so they can just use it to find the "nearest object of a particular kind".) So, they put the key they already have into a lead box, as the spell "can't locate an object if any thickness of lead, even a thin sheet, blocks a direct path between you and the object." Then they cast Locate Object to find "a key".
I see two possibilities:
- As "Locate Object" can't locate the key in the lead box, it skips over that one and points the direction to the second-closest key.
- The spell attempts to "locate the nearest object" of that kind, and as the nearest object is behind lead, the spell "can't locate" it. It has no provision to find the "second-closest object" of a kind.
But I'm not sure which is the case. While there's certainly some intuition that the first possibility would make sense, this is magic we're talking about, and I see it making as much sense that the way the spell is worded it would just not be able to find what it's looking for.
I'd prefer official sources or references if available. If there aren't any, then I would accept any semi-official or well-informed well-reasoned arguments, preferably backed up by whatever evidence is available. Obviously as with any rules interpretation the DM has the final say, but I'm usually the DM of our group, and the party may likely try something like this in our next session.