Kayerloth |
I've always gone with your second interpretation. The spell itself is really "loose" and subject to GM and House ruling(s) if you ask me.
In general I wouldn't have it be blocked by normal rock, earth, wood etc. no matter the volume or amount in between you and the object. The limitations do to range and the degree of familiarity with the Object I've always found sufficient to block misuse and otherwise restrict the spell. That's not to say naturally occurring veins of lead rich rock or areas of intense magic might not play havoc with the spell either but that would be subject to the GM.
Unlike Detect Magic (and the majority of the other "Detect" spells) there is no wording of
The spell can penetrate barriers, but 1 foot of stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood or dirt blocks it.
But it's a 'Locate' spell not a 'Detect' for what that might be worth (very little since that's essentially flavor text but I also think the flavor or fluff in descriptive text shows towards intent if not actual rule). Locate Creature specifically mentions running water as blocking the spell.