Not sure if this is a bug or intended, but I had a Sokeman not granting city walls upon a settlement being founded. The reason why I'm unsure is that the Sokeman was injured and there was a hostile unit next to it when I founded the settlement, either of which might be the cause of why no city walls were granted.