Crag and your settlement, (and marshland, and base rock, and moss covered xxx, etc.) aren't actual single tile type names (but tile surface cover layers and/or additional informative tags) and thus not recognized by the NEARBY_TILE. It's not a bug per se. NEARBY_TILE only recognizes a bunch of the very basics.