(a) says "facility", not lands.If I may ...
Not making that assumption at all. Subsection 3, to me, reads, if one is hunting on federal lands, ie BLM lands, US Parks etc., and enters a US Park Rangers shack or cabin or office, (a Federal facility regardless of size), either after a hunt, or prior to a hunt, by signing in or out, or letting a Ranger know of your plans, checking on the weather, asking of good hunt camp areas, snow-pack conditions, or for what ever other lawful purpose. I'm pretty sure it does not apply to a Federal facility building within a city. And, in addition, there may very well be certain US Ranger, (or other such similar US Department facilities), cabins/shacks/offices, (Federal facilities), that have signs posted to leave all weapons in your vehicle prior to entering said facilities, such as a main Ranger office building at an entrance to a Park where non-hunting and non-armed people frequent. But a shack/cabin/office within the interior of the park would not. But I'm betting number 3 does not apply to the incident with the cop. He's still in the wrong vis a vis (a) Except as provided in subsection (d), whoever knowingly possesses or causes to be present a firearm or other dangerous weapon in a Federal facility (other than a Federal court facility), or attempts to do so, shall be fined under this title or imprisoned not more than 1 year, or both.
The cop wasn't wrong in my opinion because (a) says "Except as provided in subsection (d)", which allows for legal carry.
The distinction seems to be what a "legal purpose" is, and in my view any non-illegal purpose is a legal purpose.